Ticket #16705: v1-0001-tests-RemoteControlTest-convert-from-JOSMFixture-.patch

File v1-0001-tests-RemoteControlTest-convert-from-JOSMFixture-.patch, 1.9 KB (added by ris, 6 years ago)
  • test/unit/org/openstreetmap/josm/io/remotecontrol/RemoteControlTest.java

    From d4ce87a655e210cfb62dac00a972cced9e82806c Mon Sep 17 00:00:00 2001
    From: Robert Scott <code@humanleg.org.uk>
    Date: Thu, 23 Aug 2018 21:45:06 +0100
    Subject: [PATCH v1 1/3] tests: RemoteControlTest: convert from JOSMFixture to
     JOSMTestRules
    
    ---
     .../openstreetmap/josm/io/remotecontrol/RemoteControlTest.java | 10 +++++++++-
     1 file changed, 9 insertions(+), 1 deletion(-)
    
    diff --git a/test/unit/org/openstreetmap/josm/io/remotecontrol/RemoteControlTest.java b/test/unit/org/openstreetmap/josm/io/remotecontrol/RemoteControlTest.java
    index f390b8962..401cebbe1 100644
    a b import javax.net.ssl.X509TrustManager;  
    2525
    2626import org.junit.After;
    2727import org.junit.Before;
     28import org.junit.Rule;
    2829import org.junit.Test;
    2930import org.openstreetmap.josm.JOSMFixture;
    3031import org.openstreetmap.josm.TestUtils;
    3132import org.openstreetmap.josm.spi.preferences.Config;
     33import org.openstreetmap.josm.testutils.JOSMTestRules;
    3234import org.openstreetmap.josm.tools.Logging;
    3335import org.openstreetmap.josm.tools.PlatformHookWindows;
    3436import org.openstreetmap.josm.tools.PlatformManager;
    public class RemoteControlTest {  
    5355    }
    5456
    5557    /**
     58     * Setup test.
     59     */
     60    @Rule
     61    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     62    public JOSMTestRules test = new JOSMTestRules().preferences().https().assertionsInEDT();
     63
     64    /**
    5665     * Starts Remote control before testing requests.
    5766     * @throws GeneralSecurityException if a security error occurs
    5867     */
    5968    @Before
    6069    public void setUp() throws GeneralSecurityException {
    61         JOSMFixture.createUnitTestFixture().init();
    6270        RemoteControl.PROP_REMOTECONTROL_HTTPS_ENABLED.put(true);
    6371        deleteKeystore();
    6472