Ignore:
Timestamp:
2016-09-03T14:22:22+02:00 (4 years ago)
Author:
Don-vip
Message:

convert more unit tests to JOSMTestRules

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

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/imagery/ImageryInfoTest.java

    r10735 r10945  
    1010import java.util.Set;
    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.Preferences;
     15import org.openstreetmap.josm.testutils.JOSMTestRules;
    1616import org.openstreetmap.josm.tools.MultiMap;
     17
     18import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1719
    1820/**
     
    2628     * Setup tests
    2729     */
    28     @BeforeClass
    29     public static void setUp() {
    30         JOSMFixture.createUnitTestFixture().init();
    31     }
     30    @Rule
     31    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     32    public JOSMTestRules test = new JOSMTestRules();
    3233
    3334    /**
  • trunk/test/unit/org/openstreetmap/josm/data/imagery/TemplatedWMSTileSourceTest.java

    r10758 r10945  
    55import static org.junit.Assert.assertTrue;
    66
    7 import org.junit.BeforeClass;
     7import org.junit.Rule;
    88import org.junit.Test;
    99import org.openstreetmap.gui.jmapviewer.TileXY;
    1010import org.openstreetmap.gui.jmapviewer.interfaces.ICoordinate;
    1111import org.openstreetmap.gui.jmapviewer.tilesources.TemplatedTMSTileSource;
    12 import org.openstreetmap.josm.JOSMFixture;
    1312import org.openstreetmap.josm.Main;
    1413import org.openstreetmap.josm.data.Bounds;
     
    1716import org.openstreetmap.josm.data.projection.CustomProjection;
    1817import org.openstreetmap.josm.data.projection.Projections;
     18import org.openstreetmap.josm.testutils.JOSMTestRules;
     19
     20import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1921
    2022/**
     
    2931     * Setup test.
    3032     */
    31     @BeforeClass
    32     public static void setUp() {
    33         JOSMFixture.createUnitTestFixture().init();
    34     }
     33    @Rule
     34    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     35    public JOSMTestRules test = new JOSMTestRules();
    3536
    3637    /**
  • trunk/test/unit/org/openstreetmap/josm/data/imagery/WMTSTileSourceTest.java

    r10758 r10945  
    99import java.net.MalformedURLException;
    1010
    11 import org.junit.BeforeClass;
    1211import org.junit.Ignore;
     12import org.junit.Rule;
    1313import org.junit.Test;
    1414import org.openstreetmap.gui.jmapviewer.tilesources.TemplatedTMSTileSource;
    15 import org.openstreetmap.josm.JOSMFixture;
    1615import org.openstreetmap.josm.Main;
    1716import org.openstreetmap.josm.TestUtils;
     
    1918import org.openstreetmap.josm.data.coor.LatLon;
    2019import org.openstreetmap.josm.data.projection.Projections;
     20import org.openstreetmap.josm.testutils.JOSMTestRules;
     21
     22import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    2123
    2224/**
     
    4042     * Setup test.
    4143     */
    42     @BeforeClass
    43     public static void setUp() {
    44         JOSMFixture.createUnitTestFixture().init();
    45     }
     44    @Rule
     45    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     46    public JOSMTestRules test = new JOSMTestRules();
    4647
    4748    private static ImageryInfo getImagery(String path) {
Note: See TracChangeset for help on using the changeset viewer.