Ignore:
Timestamp:
2017-08-04T20:03:38+02:00 (7 years ago)
Author:
Don-vip
Message:

fix unit test

Location:
trunk/test/unit/org/openstreetmap/josm/data/validation/tests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/validation/tests/ConditionalKeysTest.java

    r11403 r12568  
    66
    77import org.junit.Before;
     8import org.junit.Rule;
    89import org.junit.Test;
    9 import org.openstreetmap.josm.JOSMFixture;
    10 import org.openstreetmap.josm.gui.tagging.presets.TaggingPresets;
     10import org.openstreetmap.josm.testutils.JOSMTestRules;
     11
     12import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1113
    1214/**
     
    1921    /**
    2022     * Setup test
     23     */
     24    @Rule
     25    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     26    public JOSMTestRules rule = new JOSMTestRules().presets();
     27
     28    /**
     29     * Setup test
    2130     * @throws Exception if an error occurs
    2231     */
    2332    @Before
    2433    public void setUp() throws Exception {
    25         JOSMFixture.createUnitTestFixture().init();
    26         TaggingPresets.readFromPreferences();
    2734        test.initialize();
    2835    }
  • trunk/test/unit/org/openstreetmap/josm/data/validation/tests/MultipolygonTestTest.java

    r12564 r12568  
    3535    @Rule
    3636    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    37     public JOSMTestRules test = new JOSMTestRules().projection().preferences();
     37    public JOSMTestRules test = new JOSMTestRules().projection().mapStyles().presets().main().platform();
    3838
    3939    private static Way createUnclosedWay(String tags) {
  • trunk/test/unit/org/openstreetmap/josm/data/validation/tests/TagCheckerTest.java

    r10743 r12568  
    1010import java.util.List;
    1111
    12 import org.junit.BeforeClass;
     12import org.junit.Rule;
    1313import org.junit.Test;
    14 import org.openstreetmap.josm.JOSMFixture;
    1514import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1615import org.openstreetmap.josm.data.osm.OsmUtils;
    1716import org.openstreetmap.josm.data.osm.Tag;
    1817import org.openstreetmap.josm.data.validation.TestError;
    19 import org.openstreetmap.josm.gui.tagging.presets.TaggingPresets;
     18import org.openstreetmap.josm.testutils.JOSMTestRules;
     19
     20import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    2021
    2122/**
     
    2728     * Setup test.
    2829     */
    29     @BeforeClass
    30     public static void setUp() {
    31         JOSMFixture.createUnitTestFixture().init();
    32         TaggingPresets.readFromPreferences();
    33     }
     30    @Rule
     31    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     32    public JOSMTestRules rule = new JOSMTestRules().presets();
    3433
    3534    List<TestError> test(OsmPrimitive primitive) throws IOException {
Note: See TracChangeset for help on using the changeset viewer.