Changeset 10979 in josm for trunk/test


Ignore:
Timestamp:
2016-09-09T01:41:16+02:00 (3 years ago)
Author:
Don-vip
Message:

add unit test for ApiUrlTestTask

Location:
trunk/test
Files:
4 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/server/AuthenticationPreferenceTest.java

    r10378 r10979  
    44import static org.junit.Assert.assertNotNull;
    55
    6 import org.junit.BeforeClass;
     6import org.junit.Rule;
    77import org.junit.Test;
    8 import org.openstreetmap.josm.JOSMFixture;
    98import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
     9import org.openstreetmap.josm.testutils.JOSMTestRules;
     10
     11import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1012
    1113/**
     
    1517
    1618    /**
    17      * Setup test.
     19     * Setup tests
    1820     */
    19     @BeforeClass
    20     public static void setUpBeforeClass() {
    21         JOSMFixture.createUnitTestFixture().init();
    22     }
     21    @Rule
     22    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     23    public JOSMTestRules test = new JOSMTestRules().preferences().platform();
    2324
    2425    /**
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/server/OverpassServerPreferenceTest.java

    r10378 r10979  
    44import static org.junit.Assert.assertNotNull;
    55
    6 import org.junit.BeforeClass;
     6import org.junit.Rule;
    77import org.junit.Test;
    8 import org.openstreetmap.josm.JOSMFixture;
    98import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
     9import org.openstreetmap.josm.testutils.JOSMTestRules;
     10
     11import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1012
    1113/**
     
    1517
    1618    /**
    17      * Setup test.
     19     * Setup tests
    1820     */
    19     @BeforeClass
    20     public static void setUpBeforeClass() {
    21         JOSMFixture.createUnitTestFixture().init();
    22     }
     21    @Rule
     22    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     23    public JOSMTestRules test = new JOSMTestRules().preferences().platform();
    2324
    2425    /**
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/server/ProxyPreferenceTest.java

    r10378 r10979  
    44import static org.junit.Assert.assertNotNull;
    55
    6 import org.junit.BeforeClass;
     6import org.junit.Rule;
    77import org.junit.Test;
    8 import org.openstreetmap.josm.JOSMFixture;
    98import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
     9import org.openstreetmap.josm.testutils.JOSMTestRules;
     10
     11import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1012
    1113/**
     
    1517
    1618    /**
    17      * Setup test.
     19     * Setup tests
    1820     */
    19     @BeforeClass
    20     public static void setUpBeforeClass() {
    21         JOSMFixture.createUnitTestFixture().init();
    22     }
     21    @Rule
     22    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     23    public JOSMTestRules test = new JOSMTestRules().preferences().platform();
    2324
    2425    /**
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/server/ServerAccessPreferenceTest.java

    r10378 r10979  
    44import static org.junit.Assert.assertNotNull;
    55
    6 import org.junit.BeforeClass;
     6import org.junit.Rule;
    77import org.junit.Test;
    8 import org.openstreetmap.josm.JOSMFixture;
    98import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
     9import org.openstreetmap.josm.testutils.JOSMTestRules;
     10
     11import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1012
    1113/**
     
    1517
    1618    /**
    17      * Setup test.
     19     * Setup tests
    1820     */
    19     @BeforeClass
    20     public static void setUpBeforeClass() {
    21         JOSMFixture.createUnitTestFixture().init();
    22     }
     21    @Rule
     22    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     23    public JOSMTestRules test = new JOSMTestRules().preferences().platform();
    2324
    2425    /**
Note: See TracChangeset for help on using the changeset viewer.