Changeset 10945 in josm
- Timestamp:
- 2016-09-03T14:22:22+02:00 (8 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm
- Files:
-
- 72 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/actions/CombineWayActionTest.java
r10758 r10945 10 10 import java.util.Set; 11 11 12 import org.junit. BeforeClass;12 import org.junit.Rule; 13 13 import org.junit.Test; 14 import org.openstreetmap.josm.JOSMFixture;15 14 import org.openstreetmap.josm.TestUtils; 16 15 import org.openstreetmap.josm.actions.CombineWayAction.NodeGraph; … … 20 19 import org.openstreetmap.josm.io.IllegalDataException; 21 20 import org.openstreetmap.josm.io.OsmReader; 21 import org.openstreetmap.josm.testutils.JOSMTestRules; 22 22 23 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 23 24 import nl.jqno.equalsverifier.EqualsVerifier; 24 25 … … 31 32 * Setup test. 32 33 */ 33 @BeforeClass 34 public static void setUp() { 35 JOSMFixture.createUnitTestFixture().init(); 36 } 34 @Rule 35 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 36 public JOSMTestRules test = new JOSMTestRules(); 37 37 38 38 /** -
trunk/test/unit/org/openstreetmap/josm/actions/CreateCircleActionTest.java
r10937 r10945 13 13 import java.util.Collections; 14 14 15 import org.junit. BeforeClass;15 import org.junit.Rule; 16 16 import org.junit.Test; 17 import org.openstreetmap.josm.JOSMFixture;18 17 import org.openstreetmap.josm.Main; 19 18 import org.openstreetmap.josm.data.coor.EastNorth; … … 25 24 import org.openstreetmap.josm.data.osm.Way; 26 25 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 26 import org.openstreetmap.josm.testutils.JOSMTestRules; 27 27 import org.openstreetmap.josm.tools.GeoPropertyIndex; 28 28 import org.openstreetmap.josm.tools.GeoPropertyIndex.GeoProperty; … … 30 30 import org.openstreetmap.josm.tools.RightAndLefthandTraffic; 31 31 import org.openstreetmap.josm.tools.Utils; 32 33 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 32 34 33 35 /** … … 39 41 * Setup test. 40 42 */ 41 @BeforeClass 42 public static void setUp() { 43 JOSMFixture.createUnitTestFixture().init(true); 44 } 43 @Rule 44 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 45 public JOSMTestRules test = new JOSMTestRules().platform(); 45 46 46 47 /** -
trunk/test/unit/org/openstreetmap/josm/actions/JoinAreasActionTest.java
r10457 r10945 8 8 import java.util.Collection; 9 9 10 import org.junit. BeforeClass;10 import org.junit.Rule; 11 11 import org.junit.Test; 12 import org.openstreetmap.josm.JOSMFixture;13 12 import org.openstreetmap.josm.Main; 14 13 import org.openstreetmap.josm.TestUtils; … … 21 20 import org.openstreetmap.josm.io.IllegalDataException; 22 21 import org.openstreetmap.josm.io.OsmReader; 22 import org.openstreetmap.josm.testutils.JOSMTestRules; 23 23 import org.openstreetmap.josm.tools.Utils; 24 25 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 24 26 25 27 /** … … 31 33 * Setup test. 32 34 */ 33 @BeforeClass 34 public static void setUp() { 35 JOSMFixture.createUnitTestFixture().init(true); 36 } 35 @Rule 36 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 37 public JOSMTestRules test = new JOSMTestRules().commands(); 37 38 38 39 /** -
trunk/test/unit/org/openstreetmap/josm/actions/OrthogonalizeActionTest.java
r10657 r10945 8 8 import java.util.List; 9 9 10 import org.junit. BeforeClass;10 import org.junit.Rule; 11 11 import org.junit.Test; 12 import org.openstreetmap.josm.JOSMFixture;13 12 import org.openstreetmap.josm.TestUtils; 14 13 import org.openstreetmap.josm.actions.search.SearchCompiler; … … 19 18 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 20 19 import org.openstreetmap.josm.io.OsmReader; 20 import org.openstreetmap.josm.testutils.JOSMTestRules; 21 21 import org.openstreetmap.josm.tools.Geometry; 22 22 import org.openstreetmap.josm.tools.SubclassFilteredCollection; 23 24 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 23 25 24 26 /** … … 30 32 * Setup test. 31 33 */ 32 @BeforeClass 33 public static void setUp() { 34 JOSMFixture.createUnitTestFixture().init(false); 35 } 34 @Rule 35 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 36 public JOSMTestRules test = new JOSMTestRules(); 36 37 37 38 @Test(expected = OrthogonalizeAction.InvalidUserInputException.class) -
trunk/test/unit/org/openstreetmap/josm/actions/PurgeActionTest.java
r10436 r10945 9 9 import java.io.InputStream; 10 10 11 import org.junit. BeforeClass;11 import org.junit.Rule; 12 12 import org.junit.Test; 13 import org.openstreetmap.josm.JOSMFixture;14 13 import org.openstreetmap.josm.Main; 15 14 import org.openstreetmap.josm.TestUtils; … … 19 18 import org.openstreetmap.josm.io.IllegalDataException; 20 19 import org.openstreetmap.josm.io.OsmReader; 20 import org.openstreetmap.josm.testutils.JOSMTestRules; 21 22 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 21 23 22 24 /** … … 28 30 * Setup test. 29 31 */ 30 @BeforeClass 31 public static void setUpBeforeClass() { 32 JOSMFixture.createUnitTestFixture().init(true); 33 } 32 @Rule 33 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 34 public JOSMTestRules test = new JOSMTestRules().platform(); 34 35 35 36 /** -
trunk/test/unit/org/openstreetmap/josm/actions/UnJoinNodeWayActionTest.java
r10758 r10945 6 6 import java.util.Arrays; 7 7 8 import org.junit. BeforeClass;8 import org.junit.Rule; 9 9 import org.junit.Test; 10 import org.openstreetmap.josm.JOSMFixture;11 10 import org.openstreetmap.josm.Main; 12 11 import org.openstreetmap.josm.data.coor.EastNorth; … … 15 14 import org.openstreetmap.josm.data.osm.Way; 16 15 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 16 import org.openstreetmap.josm.testutils.JOSMTestRules; 17 18 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 17 19 18 20 /** … … 38 40 * Setup test. 39 41 */ 40 @BeforeClass 41 public static void setUp() { 42 JOSMFixture.createUnitTestFixture().init(true); 43 } 42 @Rule 43 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 44 public JOSMTestRules test = new JOSMTestRules().platform(); 44 45 45 46 /** -
trunk/test/unit/org/openstreetmap/josm/actions/downloadtasks/ChangesetContentDownloadTaskTest.java
r10164 r10945 7 7 import java.util.Arrays; 8 8 9 import org.junit. BeforeClass;9 import org.junit.Rule; 10 10 import org.junit.Test; 11 import org.openstreetmap.josm.JOSMFixture; 11 import org.openstreetmap.josm.testutils.JOSMTestRules; 12 13 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 12 14 13 15 /** … … 19 21 * Setup test. 20 22 */ 21 @BeforeClass 22 public static void setUp() { 23 JOSMFixture.createUnitTestFixture().init(); 24 } 23 @Rule 24 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 25 public JOSMTestRules test = new JOSMTestRules(); 25 26 26 27 /** -
trunk/test/unit/org/openstreetmap/josm/actions/downloadtasks/ChangesetHeaderDownloadTaskTest.java
r10164 r10945 7 7 import java.util.Collections; 8 8 9 import org.junit. BeforeClass;9 import org.junit.Rule; 10 10 import org.junit.Test; 11 import org.openstreetmap.josm.JOSMFixture;12 11 import org.openstreetmap.josm.data.osm.Changeset; 12 import org.openstreetmap.josm.testutils.JOSMTestRules; 13 14 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 13 15 14 16 /** … … 20 22 * Setup test. 21 23 */ 22 @BeforeClass 23 public static void setUp() { 24 JOSMFixture.createUnitTestFixture().init(); 25 } 24 @Rule 25 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 26 public JOSMTestRules test = new JOSMTestRules(); 26 27 27 28 /** -
trunk/test/unit/org/openstreetmap/josm/actions/downloadtasks/ChangesetQueryTaskTest.java
r10164 r10945 6 6 import java.awt.Component; 7 7 8 import org.junit. BeforeClass;8 import org.junit.Rule; 9 9 import org.junit.Test; 10 import org.openstreetmap.josm.JOSMFixture;11 10 import org.openstreetmap.josm.io.ChangesetQuery; 11 import org.openstreetmap.josm.testutils.JOSMTestRules; 12 13 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 12 14 13 15 /** … … 19 21 * Setup test. 20 22 */ 21 @BeforeClass 22 public static void setUp() { 23 JOSMFixture.createUnitTestFixture().init(); 24 } 23 @Rule 24 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 25 public JOSMTestRules test = new JOSMTestRules(); 25 26 26 27 /** -
trunk/test/unit/org/openstreetmap/josm/actions/downloadtasks/DownloadGpsTaskTest.java
r9669 r10945 8 8 import java.util.concurrent.ExecutionException; 9 9 10 import org.junit. BeforeClass;10 import org.junit.Rule; 11 11 import org.junit.Test; 12 import org.openstreetmap.josm.JOSMFixture;13 12 import org.openstreetmap.josm.data.gpx.GpxData; 13 import org.openstreetmap.josm.testutils.JOSMTestRules; 14 15 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 14 16 15 17 /** … … 23 25 * Setup test. 24 26 */ 25 @BeforeClass 26 public static void setUp() { 27 JOSMFixture.createUnitTestFixture().init(); 28 } 27 @Rule 28 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 29 public JOSMTestRules test = new JOSMTestRules(); 29 30 30 31 /** -
trunk/test/unit/org/openstreetmap/josm/actions/downloadtasks/DownloadNotesTaskTest.java
r9905 r10945 8 8 import java.util.concurrent.ExecutionException; 9 9 10 import org.junit. BeforeClass;10 import org.junit.Rule; 11 11 import org.junit.Test; 12 import org.openstreetmap.josm.JOSMFixture;13 12 import org.openstreetmap.josm.data.osm.NoteData; 13 import org.openstreetmap.josm.testutils.JOSMTestRules; 14 15 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 14 16 15 17 /** … … 23 25 * Setup test. 24 26 */ 25 @BeforeClass 26 public static void setUp() { 27 JOSMFixture.createUnitTestFixture().init(true); 28 } 27 @Rule 28 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 29 public JOSMTestRules test = new JOSMTestRules().platform(); 29 30 30 31 /** -
trunk/test/unit/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTaskTest.java
r9669 r10945 8 8 import java.util.concurrent.ExecutionException; 9 9 10 import org.junit. BeforeClass;10 import org.junit.Rule; 11 11 import org.junit.Test; 12 import org.openstreetmap.josm.JOSMFixture;13 12 import org.openstreetmap.josm.data.osm.DataSet; 13 import org.openstreetmap.josm.testutils.JOSMTestRules; 14 15 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 14 16 15 17 /** … … 23 25 * Setup test. 24 26 */ 25 @BeforeClass 26 public static void setUp() { 27 JOSMFixture.createUnitTestFixture().init(); 28 } 27 @Rule 28 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 29 public JOSMTestRules test = new JOSMTestRules(); 29 30 30 31 /** -
trunk/test/unit/org/openstreetmap/josm/actions/downloadtasks/DownloadReferrersTaskTest.java
r10047 r10945 6 6 import static org.junit.Assert.fail; 7 7 8 import org.junit. BeforeClass;8 import org.junit.Rule; 9 9 import org.junit.Test; 10 import org.openstreetmap.josm.JOSMFixture;11 10 import org.openstreetmap.josm.data.coor.LatLon; 12 11 import org.openstreetmap.josm.data.osm.DataSet; … … 14 13 import org.openstreetmap.josm.data.osm.OsmPrimitiveType; 15 14 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 15 import org.openstreetmap.josm.testutils.JOSMTestRules; 16 17 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 16 18 17 19 /** … … 23 25 * Setup test. 24 26 */ 25 @BeforeClass 26 public static void setUp() { 27 JOSMFixture.createUnitTestFixture().init(); 28 } 27 @Rule 28 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 29 public JOSMTestRules test = new JOSMTestRules(); 29 30 30 31 /** -
trunk/test/unit/org/openstreetmap/josm/actions/downloadtasks/DownloadTaskListTest.java
r10047 r10945 4 4 import static org.junit.Assert.assertTrue; 5 5 6 import org.junit. BeforeClass;6 import org.junit.Rule; 7 7 import org.junit.Test; 8 import org.openstreetmap.josm.JOSMFixture; 8 import org.openstreetmap.josm.testutils.JOSMTestRules; 9 10 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 9 11 10 12 /** … … 16 18 * Setup test. 17 19 */ 18 @BeforeClass 19 public static void setUp() { 20 JOSMFixture.createUnitTestFixture().init(); 21 } 20 @Rule 21 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 22 public JOSMTestRules test = new JOSMTestRules(); 22 23 23 24 /** -
trunk/test/unit/org/openstreetmap/josm/actions/downloadtasks/PostDownloadHandlerTest.java
r10222 r10945 13 13 import java.util.concurrent.TimeoutException; 14 14 15 import org.junit. BeforeClass;15 import org.junit.Rule; 16 16 import org.junit.Test; 17 import org.openstreetmap.josm.JOSMFixture;18 17 import org.openstreetmap.josm.Main; 19 18 import org.openstreetmap.josm.data.Bounds; 20 19 import org.openstreetmap.josm.gui.progress.ProgressMonitor; 20 import org.openstreetmap.josm.testutils.JOSMTestRules; 21 22 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 21 23 22 24 /** … … 28 30 * Setup test. 29 31 */ 30 @BeforeClass 31 public static void setUp() { 32 JOSMFixture.createUnitTestFixture().init(); 33 } 32 @Rule 33 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 34 public JOSMTestRules test = new JOSMTestRules(); 34 35 35 36 private static DownloadTask newTask(final List<Object> errorObjects) { -
trunk/test/unit/org/openstreetmap/josm/actions/mapmode/AddNoteActionTest.java
r10436 r10945 7 7 import java.util.Collections; 8 8 9 import org.junit. BeforeClass;9 import org.junit.Rule; 10 10 import org.junit.Test; 11 import org.openstreetmap.josm.JOSMFixture;12 11 import org.openstreetmap.josm.Main; 13 12 import org.openstreetmap.josm.data.notes.Note; … … 15 14 import org.openstreetmap.josm.data.osm.NoteData; 16 15 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 16 import org.openstreetmap.josm.testutils.JOSMTestRules; 17 18 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 17 19 18 20 /** … … 24 26 * Setup test. 25 27 */ 26 @BeforeClass 27 public static void setUp() { 28 JOSMFixture.createUnitTestFixture().init(true); 29 } 28 @Rule 29 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 30 public JOSMTestRules test = new JOSMTestRules().commands(); 30 31 31 32 /** -
trunk/test/unit/org/openstreetmap/josm/actions/mapmode/DeleteActionTest.java
r10436 r10945 5 5 import static org.junit.Assert.assertTrue; 6 6 7 import org.junit. BeforeClass;7 import org.junit.Rule; 8 8 import org.junit.Test; 9 import org.openstreetmap.josm.JOSMFixture;10 9 import org.openstreetmap.josm.Main; 11 10 import org.openstreetmap.josm.data.osm.DataSet; 12 11 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 12 import org.openstreetmap.josm.testutils.JOSMTestRules; 13 14 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 13 15 14 16 /** … … 20 22 * Setup test. 21 23 */ 22 @BeforeClass 23 public static void setUp() { 24 JOSMFixture.createUnitTestFixture().init(true); 25 } 24 @Rule 25 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 26 public JOSMTestRules test = new JOSMTestRules().platform().commands(); 26 27 27 28 /** -
trunk/test/unit/org/openstreetmap/josm/actions/mapmode/DrawActionTest.java
r10452 r10945 14 14 import javax.swing.JList; 15 15 16 import org.junit. BeforeClass;16 import org.junit.Rule; 17 17 import org.junit.Test; 18 import org.openstreetmap.josm.JOSMFixture;19 18 import org.openstreetmap.josm.Main; 20 19 import org.openstreetmap.josm.data.coor.EastNorth; … … 26 25 import org.openstreetmap.josm.gui.OsmPrimitivRenderer; 27 26 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 27 import org.openstreetmap.josm.testutils.JOSMTestRules; 28 28 import org.openstreetmap.josm.tools.Utils; 29 30 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 29 31 30 32 /** … … 36 38 * Setup test. 37 39 */ 38 @BeforeClass 39 public static void setUpBeforeClass() { 40 JOSMFixture.createUnitTestFixture().init(true); 41 } 40 @Rule 41 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 42 public JOSMTestRules test = new JOSMTestRules().commands(); 42 43 43 44 /** -
trunk/test/unit/org/openstreetmap/josm/actions/mapmode/ExtrudeActionTest.java
r10436 r10945 5 5 import static org.junit.Assert.assertTrue; 6 6 7 import org.junit. BeforeClass;7 import org.junit.Rule; 8 8 import org.junit.Test; 9 import org.openstreetmap.josm.JOSMFixture;10 9 import org.openstreetmap.josm.Main; 11 10 import org.openstreetmap.josm.data.osm.DataSet; 12 11 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 12 import org.openstreetmap.josm.testutils.JOSMTestRules; 13 14 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 13 15 14 16 /** … … 20 22 * Setup test. 21 23 */ 22 @BeforeClass 23 public static void setUp() { 24 JOSMFixture.createUnitTestFixture().init(true); 25 } 24 @Rule 25 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 26 public JOSMTestRules test = new JOSMTestRules().platform().commands(); 26 27 27 28 /** -
trunk/test/unit/org/openstreetmap/josm/actions/mapmode/ImproveWayAccuracyActionTest.java
r10436 r10945 5 5 import static org.junit.Assert.assertTrue; 6 6 7 import org.junit. BeforeClass;7 import org.junit.Rule; 8 8 import org.junit.Test; 9 import org.openstreetmap.josm.JOSMFixture;10 9 import org.openstreetmap.josm.Main; 11 10 import org.openstreetmap.josm.data.osm.DataSet; 12 11 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 12 import org.openstreetmap.josm.testutils.JOSMTestRules; 13 14 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 13 15 14 16 /** … … 20 22 * Setup test. 21 23 */ 22 @BeforeClass 23 public static void setUp() { 24 JOSMFixture.createUnitTestFixture().init(true); 25 } 24 @Rule 25 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 26 public JOSMTestRules test = new JOSMTestRules().platform().commands(); 26 27 27 28 /** -
trunk/test/unit/org/openstreetmap/josm/actions/mapmode/ParallelWayActionTest.java
r10436 r10945 5 5 import static org.junit.Assert.assertTrue; 6 6 7 import org.junit. BeforeClass;7 import org.junit.Rule; 8 8 import org.junit.Test; 9 import org.openstreetmap.josm.JOSMFixture;10 9 import org.openstreetmap.josm.Main; 11 10 import org.openstreetmap.josm.data.osm.DataSet; 12 11 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 12 import org.openstreetmap.josm.testutils.JOSMTestRules; 13 14 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 13 15 14 16 /** … … 20 22 * Setup test. 21 23 */ 22 @BeforeClass 23 public static void setUp() { 24 JOSMFixture.createUnitTestFixture().init(true); 25 } 24 @Rule 25 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 26 public JOSMTestRules test = new JOSMTestRules().platform().commands(); 26 27 27 28 /** -
trunk/test/unit/org/openstreetmap/josm/actions/mapmode/PlayHeadDragModeTest.java
r10436 r10945 5 5 import static org.junit.Assert.assertTrue; 6 6 7 import org.junit. BeforeClass;7 import org.junit.Rule; 8 8 import org.junit.Test; 9 import org.openstreetmap.josm.JOSMFixture;10 9 import org.openstreetmap.josm.Main; 11 10 import org.openstreetmap.josm.data.osm.DataSet; 12 11 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 13 12 import org.openstreetmap.josm.gui.layer.markerlayer.PlayHeadMarker; 13 import org.openstreetmap.josm.testutils.JOSMTestRules; 14 15 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 14 16 15 17 /** … … 21 23 * Setup test. 22 24 */ 23 @BeforeClass 24 public static void setUp() { 25 JOSMFixture.createUnitTestFixture().init(true); 26 } 25 @Rule 26 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 27 public JOSMTestRules test = new JOSMTestRules().platform().commands(); 27 28 28 29 /** -
trunk/test/unit/org/openstreetmap/josm/actions/mapmode/SelectActionTest.java
r10937 r10945 12 12 import java.util.Collection; 13 13 14 import org.junit. BeforeClass;14 import org.junit.Rule; 15 15 import org.junit.Test; 16 import org.openstreetmap.josm.JOSMFixture;17 16 import org.openstreetmap.josm.Main; 18 17 import org.openstreetmap.josm.data.coor.EastNorth; … … 22 21 import org.openstreetmap.josm.gui.MapFrame; 23 22 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 23 import org.openstreetmap.josm.testutils.JOSMTestRules; 24 24 import org.openstreetmap.josm.tools.Utils; 25 25 … … 53 53 * Setup test. 54 54 */ 55 @BeforeClass 56 public static void setUpBeforeClass() { 57 JOSMFixture.createUnitTestFixture().init(true); 58 } 55 @Rule 56 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 57 public JOSMTestRules test = new JOSMTestRules().platform().projection().commands(); 59 58 60 59 /** -
trunk/test/unit/org/openstreetmap/josm/actions/upload/FixDataHookTest.java
r9845 r10945 10 10 import java.util.Collection; 11 11 12 import org.junit. BeforeClass;12 import org.junit.Rule; 13 13 import org.junit.Test; 14 import org.openstreetmap.josm.JOSMFixture;15 14 import org.openstreetmap.josm.Main; 16 15 import org.openstreetmap.josm.command.PseudoCommand; … … 21 20 import org.openstreetmap.josm.data.osm.Relation; 22 21 import org.openstreetmap.josm.data.osm.Way; 22 import org.openstreetmap.josm.testutils.JOSMTestRules; 23 24 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 23 25 24 26 /** … … 30 32 * Setup test. 31 33 */ 32 @BeforeClass 33 public static void setUpBeforeClass() { 34 JOSMFixture.createUnitTestFixture().init(true); 35 } 34 @Rule 35 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 36 public JOSMTestRules test = new JOSMTestRules().commands(); 36 37 37 38 /** -
trunk/test/unit/org/openstreetmap/josm/actions/upload/ValidateUploadHookTest.java
r9675 r10945 2 2 package org.openstreetmap.josm.actions.upload; 3 3 4 import org.junit. BeforeClass;4 import org.junit.Rule; 5 5 import org.junit.Test; 6 import org.openstreetmap.josm.JOSMFixture;7 6 import org.openstreetmap.josm.data.APIDataSet; 7 import org.openstreetmap.josm.testutils.JOSMTestRules; 8 9 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 8 10 9 11 /** … … 15 17 * Setup test. 16 18 */ 17 @BeforeClass 18 public static void setUpBeforeClass() { 19 JOSMFixture.createUnitTestFixture().init(); 20 } 19 @Rule 20 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 21 public JOSMTestRules test = new JOSMTestRules().platform(); 21 22 22 23 /** -
trunk/test/unit/org/openstreetmap/josm/command/TransformNodesCommandTest.java
r10758 r10945 2 2 package org.openstreetmap.josm.command; 3 3 4 import org.junit. BeforeClass;4 import org.junit.Rule; 5 5 import org.junit.Test; 6 import org.openstreetmap.josm.JOSMFixture;7 6 import org.openstreetmap.josm.data.coor.LatLon; 8 7 import org.openstreetmap.josm.data.osm.DataSet; 9 8 import org.openstreetmap.josm.data.osm.User; 10 9 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 10 import org.openstreetmap.josm.testutils.JOSMTestRules; 11 11 12 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 12 13 import nl.jqno.equalsverifier.EqualsVerifier; 13 14 import nl.jqno.equalsverifier.Warning; … … 21 22 * Setup test. 22 23 */ 23 @BeforeClass 24 public static void setUpBeforeClass() { 25 JOSMFixture.createUnitTestFixture().init(false); 26 } 24 @Rule 25 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 26 public JOSMTestRules test = new JOSMTestRules(); 27 27 28 28 /** -
trunk/test/unit/org/openstreetmap/josm/command/conflict/ConflictResolveCommandTest.java
r10758 r10945 2 2 package org.openstreetmap.josm.command.conflict; 3 3 4 import org.junit. BeforeClass;4 import org.junit.Rule; 5 5 import org.junit.Test; 6 import org.openstreetmap.josm.JOSMFixture;7 6 import org.openstreetmap.josm.data.conflict.Conflict; 8 7 import org.openstreetmap.josm.data.osm.DataSet; … … 10 9 import org.openstreetmap.josm.data.osm.User; 11 10 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 11 import org.openstreetmap.josm.testutils.JOSMTestRules; 12 12 13 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 13 14 import nl.jqno.equalsverifier.EqualsVerifier; 14 15 import nl.jqno.equalsverifier.Warning; … … 22 23 * Setup test. 23 24 */ 24 @BeforeClass 25 public static void setUpBeforeClass() { 26 JOSMFixture.createUnitTestFixture().init(false); 27 } 25 @Rule 26 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 27 public JOSMTestRules test = new JOSMTestRules(); 28 28 29 29 /** -
trunk/test/unit/org/openstreetmap/josm/command/conflict/DeletedStateConflictResolveCommandTest.java
r10758 r10945 2 2 package org.openstreetmap.josm.command.conflict; 3 3 4 import org.junit. BeforeClass;4 import org.junit.Rule; 5 5 import org.junit.Test; 6 import org.openstreetmap.josm.JOSMFixture;7 6 import org.openstreetmap.josm.data.conflict.Conflict; 8 7 import org.openstreetmap.josm.data.osm.DataSet; … … 11 10 import org.openstreetmap.josm.data.osm.Way; 12 11 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 12 import org.openstreetmap.josm.testutils.JOSMTestRules; 13 13 14 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 14 15 import nl.jqno.equalsverifier.EqualsVerifier; 15 16 import nl.jqno.equalsverifier.Warning; … … 23 24 * Setup test. 24 25 */ 25 @BeforeClass 26 public static void setUpBeforeClass() { 27 JOSMFixture.createUnitTestFixture().init(false); 28 } 26 @Rule 27 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 28 public JOSMTestRules test = new JOSMTestRules(); 29 29 30 30 /** -
trunk/test/unit/org/openstreetmap/josm/command/conflict/ModifiedConflictResolveCommandTest.java
r10758 r10945 2 2 package org.openstreetmap.josm.command.conflict; 3 3 4 import org.junit. BeforeClass;4 import org.junit.Rule; 5 5 import org.junit.Test; 6 import org.openstreetmap.josm.JOSMFixture;7 6 import org.openstreetmap.josm.data.conflict.Conflict; 8 7 import org.openstreetmap.josm.data.osm.DataSet; … … 11 10 import org.openstreetmap.josm.data.osm.Way; 12 11 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 12 import org.openstreetmap.josm.testutils.JOSMTestRules; 13 13 14 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 14 15 import nl.jqno.equalsverifier.EqualsVerifier; 15 16 import nl.jqno.equalsverifier.Warning; … … 23 24 * Setup test. 24 25 */ 25 @BeforeClass 26 public static void setUpBeforeClass() { 27 JOSMFixture.createUnitTestFixture().init(false); 28 } 26 @Rule 27 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 28 public JOSMTestRules test = new JOSMTestRules(); 29 29 30 30 /** -
trunk/test/unit/org/openstreetmap/josm/command/conflict/RelationMemberConflictResolverCommandTest.java
r10758 r10945 2 2 package org.openstreetmap.josm.command.conflict; 3 3 4 import org.junit. BeforeClass;4 import org.junit.Rule; 5 5 import org.junit.Test; 6 import org.openstreetmap.josm.JOSMFixture;7 6 import org.openstreetmap.josm.data.conflict.Conflict; 8 7 import org.openstreetmap.josm.data.osm.DataSet; … … 11 10 import org.openstreetmap.josm.data.osm.User; 12 11 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 12 import org.openstreetmap.josm.testutils.JOSMTestRules; 13 13 14 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 14 15 import nl.jqno.equalsverifier.EqualsVerifier; 15 16 import nl.jqno.equalsverifier.Warning; … … 23 24 * Setup test. 24 25 */ 25 @BeforeClass 26 public static void setUpBeforeClass() { 27 JOSMFixture.createUnitTestFixture().init(false); 28 } 26 @Rule 27 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 28 public JOSMTestRules test = new JOSMTestRules(); 29 29 30 30 /** -
trunk/test/unit/org/openstreetmap/josm/command/conflict/TagConflictResolveCommandTest.java
r10758 r10945 2 2 package org.openstreetmap.josm.command.conflict; 3 3 4 import org.junit. BeforeClass;4 import org.junit.Rule; 5 5 import org.junit.Test; 6 import org.openstreetmap.josm.JOSMFixture;7 6 import org.openstreetmap.josm.data.conflict.Conflict; 8 7 import org.openstreetmap.josm.data.osm.DataSet; … … 11 10 import org.openstreetmap.josm.data.osm.Way; 12 11 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 12 import org.openstreetmap.josm.testutils.JOSMTestRules; 13 13 14 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 14 15 import nl.jqno.equalsverifier.EqualsVerifier; 15 16 import nl.jqno.equalsverifier.Warning; … … 23 24 * Setup test. 24 25 */ 25 @BeforeClass 26 public static void setUpBeforeClass() { 27 JOSMFixture.createUnitTestFixture().init(false); 28 } 26 @Rule 27 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 28 public JOSMTestRules test = new JOSMTestRules(); 29 29 30 30 /** -
trunk/test/unit/org/openstreetmap/josm/command/conflict/VersionConflictResolveCommandTest.java
r10758 r10945 2 2 package org.openstreetmap.josm.command.conflict; 3 3 4 import org.junit. BeforeClass;4 import org.junit.Rule; 5 5 import org.junit.Test; 6 import org.openstreetmap.josm.JOSMFixture;7 6 import org.openstreetmap.josm.data.conflict.Conflict; 8 7 import org.openstreetmap.josm.data.osm.DataSet; … … 11 10 import org.openstreetmap.josm.data.osm.Way; 12 11 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 12 import org.openstreetmap.josm.testutils.JOSMTestRules; 13 13 14 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 14 15 import nl.jqno.equalsverifier.EqualsVerifier; 15 16 import nl.jqno.equalsverifier.Warning; … … 23 24 * Setup test. 24 25 */ 25 @BeforeClass 26 public static void setUpBeforeClass() { 27 JOSMFixture.createUnitTestFixture().init(false); 28 } 26 @Rule 27 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 28 public JOSMTestRules test = new JOSMTestRules(); 29 29 30 30 /** -
trunk/test/unit/org/openstreetmap/josm/command/conflict/WayNodesConflictResolverCommandTest.java
r10758 r10945 2 2 package org.openstreetmap.josm.command.conflict; 3 3 4 import org.junit. BeforeClass;4 import org.junit.Rule; 5 5 import org.junit.Test; 6 import org.openstreetmap.josm.JOSMFixture;7 6 import org.openstreetmap.josm.data.conflict.Conflict; 8 7 import org.openstreetmap.josm.data.osm.DataSet; … … 11 10 import org.openstreetmap.josm.data.osm.Way; 12 11 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 12 import org.openstreetmap.josm.testutils.JOSMTestRules; 13 13 14 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 14 15 import nl.jqno.equalsverifier.EqualsVerifier; 15 16 import nl.jqno.equalsverifier.Warning; … … 23 24 * Setup test. 24 25 */ 25 @BeforeClass 26 public static void setUpBeforeClass() { 27 JOSMFixture.createUnitTestFixture().init(false); 28 } 26 @Rule 27 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 28 public JOSMTestRules test = new JOSMTestRules(); 29 29 30 30 /** -
trunk/test/unit/org/openstreetmap/josm/corrector/ReverseWayNoTagCorrectorTest.java
r9547 r10945 4 4 import static org.junit.Assert.assertEquals; 5 5 6 import org.junit. BeforeClass;6 import org.junit.Rule; 7 7 import org.junit.Test; 8 import org.openstreetmap.josm.JOSMFixture;9 8 import org.openstreetmap.josm.data.osm.Tag; 9 import org.openstreetmap.josm.testutils.JOSMTestRules; 10 11 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 10 12 11 13 /** … … 17 19 * Setup test. 18 20 */ 19 @BeforeClass 20 public static void setUp() { 21 JOSMFixture.createUnitTestFixture().init(); 22 } 21 @Rule 22 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 23 public JOSMTestRules test = new JOSMTestRules(); 23 24 24 25 /** -
trunk/test/unit/org/openstreetmap/josm/corrector/ReverseWayTagCorrectorTest.java
r8180 r10945 3 3 4 4 import org.junit.Assert; 5 import org.junit. BeforeClass;5 import org.junit.Rule; 6 6 import org.junit.Test; 7 import org.openstreetmap.josm.JOSMFixture;8 7 import org.openstreetmap.josm.data.osm.Tag; 8 import org.openstreetmap.josm.testutils.JOSMTestRules; 9 10 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 9 11 10 12 /** … … 16 18 * Setup test. 17 19 */ 18 @BeforeClass 19 public static void setUp() { 20 JOSMFixture.createUnitTestFixture().init(); 21 } 20 @Rule 21 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 22 public JOSMTestRules test = new JOSMTestRules(); 22 23 23 24 /** -
trunk/test/unit/org/openstreetmap/josm/data/CustomConfiguratorTest.java
r9666 r10945 14 14 15 15 import org.junit.Before; 16 import org.junit. BeforeClass;16 import org.junit.Rule; 17 17 import org.junit.Test; 18 import org.openstreetmap.josm.JOSMFixture;19 18 import org.openstreetmap.josm.Main; 20 19 import org.openstreetmap.josm.TestUtils; 20 import org.openstreetmap.josm.testutils.JOSMTestRules; 21 21 import org.openstreetmap.josm.tools.Utils; 22 23 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 22 24 23 25 /** … … 29 31 * Setup test. 30 32 */ 31 @BeforeClass 32 public static void setUpBeforeClass() { 33 JOSMFixture.createUnitTestFixture().init(); 34 } 33 @Rule 34 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 35 public JOSMTestRules test = new JOSMTestRules().platform(); 35 36 36 37 /** -
trunk/test/unit/org/openstreetmap/josm/data/cache/JCSCacheManagerTest.java
r10654 r10945 11 11 import org.apache.commons.jcs.access.CacheAccess; 12 12 import org.apache.commons.jcs.auxiliary.disk.block.BlockDiskCacheAttributes; 13 import org.junit. BeforeClass;13 import org.junit.Rule; 14 14 import org.junit.Test; 15 import org.openstreetmap.josm.JOSMFixture; 15 import org.openstreetmap.josm.testutils.JOSMTestRules; 16 17 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 16 18 17 19 /** … … 23 25 * Setup test. 24 26 */ 25 @BeforeClass 26 public static void setUp() { 27 JOSMFixture.createUnitTestFixture().init(); 28 } 27 @Rule 28 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 29 public JOSMTestRules test = new JOSMTestRules().platform(); 29 30 30 31 /** -
trunk/test/unit/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJobTest.java
r10559 r10945 11 11 12 12 import org.apache.commons.jcs.access.behavior.ICacheAccess; 13 import org.junit. BeforeClass;13 import org.junit.Rule; 14 14 import org.junit.Test; 15 import org.openstreetmap.josm.JOSMFixture;16 15 import org.openstreetmap.josm.data.cache.ICachedLoaderListener.LoadResult; 16 import org.openstreetmap.josm.testutils.JOSMTestRules; 17 17 18 18 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; … … 71 71 * Setup test. 72 72 */ 73 @BeforeClass 74 public static void setUp() { 75 JOSMFixture.createUnitTestFixture().init(); 76 } 73 @Rule 74 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 75 public JOSMTestRules test = new JOSMTestRules().platform(); 77 76 78 77 /** -
trunk/test/unit/org/openstreetmap/josm/data/coor/CachedLatLonTest.java
r10758 r10945 4 4 import java.text.DecimalFormat; 5 5 6 import org.junit. Before;6 import org.junit.Rule; 7 7 import org.junit.Test; 8 import org.openstreetmap.josm. JOSMFixture;8 import org.openstreetmap.josm.testutils.JOSMTestRules; 9 9 10 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 10 11 import nl.jqno.equalsverifier.EqualsVerifier; 11 12 import nl.jqno.equalsverifier.Warning; … … 19 20 * Setup test. 20 21 */ 21 @Before 22 public void setUp() { 23 JOSMFixture.createUnitTestFixture().init(); 24 } 22 @Rule 23 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 24 public JOSMTestRules test = new JOSMTestRules(); 25 25 26 26 /** -
trunk/test/unit/org/openstreetmap/josm/data/coor/LatLonTest.java
r10915 r10945 6 6 import java.text.DecimalFormat; 7 7 8 import org.junit. Before;8 import org.junit.Rule; 9 9 import org.junit.Test; 10 import org.openstreetmap.josm. JOSMFixture;10 import org.openstreetmap.josm.testutils.JOSMTestRules; 11 11 12 12 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; … … 21 21 * Setup test. 22 22 */ 23 @Before 24 public void setUp() { 25 JOSMFixture.createUnitTestFixture().init(); 26 } 23 @Rule 24 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 25 public JOSMTestRules test = new JOSMTestRules(); 27 26 28 27 private static final double EPSILON = 1e-6; -
trunk/test/unit/org/openstreetmap/josm/data/imagery/ImageryInfoTest.java
r10735 r10945 10 10 import java.util.Set; 11 11 12 import org.junit. BeforeClass;12 import org.junit.Rule; 13 13 import org.junit.Test; 14 import org.openstreetmap.josm.JOSMFixture;15 14 import org.openstreetmap.josm.data.Preferences; 15 import org.openstreetmap.josm.testutils.JOSMTestRules; 16 16 import org.openstreetmap.josm.tools.MultiMap; 17 18 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 17 19 18 20 /** … … 26 28 * Setup tests 27 29 */ 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(); 32 33 33 34 /** -
trunk/test/unit/org/openstreetmap/josm/data/imagery/TemplatedWMSTileSourceTest.java
r10758 r10945 5 5 import static org.junit.Assert.assertTrue; 6 6 7 import org.junit. BeforeClass;7 import org.junit.Rule; 8 8 import org.junit.Test; 9 9 import org.openstreetmap.gui.jmapviewer.TileXY; 10 10 import org.openstreetmap.gui.jmapviewer.interfaces.ICoordinate; 11 11 import org.openstreetmap.gui.jmapviewer.tilesources.TemplatedTMSTileSource; 12 import org.openstreetmap.josm.JOSMFixture;13 12 import org.openstreetmap.josm.Main; 14 13 import org.openstreetmap.josm.data.Bounds; … … 17 16 import org.openstreetmap.josm.data.projection.CustomProjection; 18 17 import org.openstreetmap.josm.data.projection.Projections; 18 import org.openstreetmap.josm.testutils.JOSMTestRules; 19 20 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 19 21 20 22 /** … … 29 31 * Setup test. 30 32 */ 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(); 35 36 36 37 /** -
trunk/test/unit/org/openstreetmap/josm/data/imagery/WMTSTileSourceTest.java
r10758 r10945 9 9 import java.net.MalformedURLException; 10 10 11 import org.junit.BeforeClass;12 11 import org.junit.Ignore; 12 import org.junit.Rule; 13 13 import org.junit.Test; 14 14 import org.openstreetmap.gui.jmapviewer.tilesources.TemplatedTMSTileSource; 15 import org.openstreetmap.josm.JOSMFixture;16 15 import org.openstreetmap.josm.Main; 17 16 import org.openstreetmap.josm.TestUtils; … … 19 18 import org.openstreetmap.josm.data.coor.LatLon; 20 19 import org.openstreetmap.josm.data.projection.Projections; 20 import org.openstreetmap.josm.testutils.JOSMTestRules; 21 22 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 21 23 22 24 /** … … 40 42 * Setup test. 41 43 */ 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(); 46 47 47 48 private static ImageryInfo getImagery(String path) { -
trunk/test/unit/org/openstreetmap/josm/data/notes/NoteCommentTest.java
r10098 r10945 8 8 import java.util.Date; 9 9 10 import org.junit. BeforeClass;10 import org.junit.Rule; 11 11 import org.junit.Test; 12 import org.openstreetmap.josm.JOSMFixture; 12 import org.openstreetmap.josm.testutils.JOSMTestRules; 13 14 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 13 15 14 16 /** … … 20 22 * Setup test. 21 23 */ 22 @BeforeClass 23 public static void init() { 24 JOSMFixture.createUnitTestFixture().init(); 25 } 24 @Rule 25 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 26 public JOSMTestRules test = new JOSMTestRules(); 26 27 27 28 /** -
trunk/test/unit/org/openstreetmap/josm/data/notes/NoteTest.java
r10758 r10945 7 7 import java.util.Date; 8 8 9 import org.junit. BeforeClass;9 import org.junit.Rule; 10 10 import org.junit.Test; 11 import org.openstreetmap.josm.JOSMFixture;12 11 import org.openstreetmap.josm.data.coor.LatLon; 12 import org.openstreetmap.josm.testutils.JOSMTestRules; 13 13 14 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 14 15 import nl.jqno.equalsverifier.EqualsVerifier; 15 16 import nl.jqno.equalsverifier.Warning; … … 23 24 * Setup test. 24 25 */ 25 @BeforeClass 26 public static void init() { 27 JOSMFixture.createUnitTestFixture().init(); 28 } 26 @Rule 27 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 28 public JOSMTestRules test = new JOSMTestRules(); 29 29 30 30 /** -
trunk/test/unit/org/openstreetmap/josm/data/oauth/OAuthParametersTest.java
r10758 r10945 6 6 import static org.junit.Assert.assertNotNull; 7 7 8 import org.junit. BeforeClass;8 import org.junit.Rule; 9 9 import org.junit.Test; 10 import org.openstreetmap.josm.JOSMFixture;11 10 import org.openstreetmap.josm.Main; 12 11 import org.openstreetmap.josm.io.OsmApi; 12 import org.openstreetmap.josm.testutils.JOSMTestRules; 13 13 14 14 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; … … 23 23 * Setup test. 24 24 */ 25 @BeforeClass 26 public static void setUpBeforeClass() { 27 JOSMFixture.createUnitTestFixture().init(); 28 } 25 @Rule 26 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 27 public JOSMTestRules test = new JOSMTestRules(); 29 28 30 29 /** -
trunk/test/unit/org/openstreetmap/josm/data/oauth/SignpostAdaptersTest.java
r10201 r10945 10 10 import java.net.URL; 11 11 12 import org.junit. BeforeClass;12 import org.junit.Rule; 13 13 import org.junit.Test; 14 import org.openstreetmap.josm.JOSMFixture;15 14 import org.openstreetmap.josm.data.oauth.SignpostAdapters.HttpRequest; 16 15 import org.openstreetmap.josm.data.oauth.SignpostAdapters.HttpResponse; 17 16 import org.openstreetmap.josm.data.oauth.SignpostAdapters.OAuthConsumer; 17 import org.openstreetmap.josm.testutils.JOSMTestRules; 18 18 import org.openstreetmap.josm.tools.HttpClient; 19 20 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 19 21 20 22 /** … … 26 28 * Setup test. 27 29 */ 28 @BeforeClass 29 public static void setUpBeforeClass() { 30 JOSMFixture.createUnitTestFixture().init(); 31 } 30 @Rule 31 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 32 public JOSMTestRules test = new JOSMTestRules(); 32 33 33 34 private static HttpClient newClient() throws MalformedURLException { -
trunk/test/unit/org/openstreetmap/josm/data/osm/APIDataSetTest.java
r10937 r10945 8 8 import java.util.List; 9 9 10 import org.junit. BeforeClass;10 import org.junit.Rule; 11 11 import org.junit.Test; 12 import org.openstreetmap.josm.JOSMFixture;13 12 import org.openstreetmap.josm.actions.upload.CyclicUploadDependencyException; 14 13 import org.openstreetmap.josm.data.APIDataSet; 14 import org.openstreetmap.josm.testutils.JOSMTestRules; 15 16 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 15 17 16 18 /** … … 22 24 * Setup test. 23 25 */ 24 @BeforeClass 25 public static void init() { 26 JOSMFixture.createUnitTestFixture().init(); 27 } 26 @Rule 27 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 28 public JOSMTestRules test = new JOSMTestRules(); 28 29 29 30 @Test -
trunk/test/unit/org/openstreetmap/josm/data/osm/BBoxTest.java
r10758 r10945 2 2 package org.openstreetmap.josm.data.osm; 3 3 4 import org.junit. Before;4 import org.junit.Rule; 5 5 import org.junit.Test; 6 import org.openstreetmap.josm. JOSMFixture;6 import org.openstreetmap.josm.testutils.JOSMTestRules; 7 7 8 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 8 9 import nl.jqno.equalsverifier.EqualsVerifier; 9 10 import nl.jqno.equalsverifier.Warning; … … 17 18 * Setup test. 18 19 */ 19 @Before 20 public void setUp() { 21 JOSMFixture.createUnitTestFixture().init(); 22 } 20 @Rule 21 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 22 public JOSMTestRules test = new JOSMTestRules(); 23 23 24 24 /** -
trunk/test/unit/org/openstreetmap/josm/data/osm/DataSetMergerTest.java
r10758 r10945 18 18 import org.junit.After; 19 19 import org.junit.Before; 20 import org.junit. BeforeClass;20 import org.junit.Rule; 21 21 import org.junit.Test; 22 import org.openstreetmap.josm.JOSMFixture;23 22 import org.openstreetmap.josm.Main; 24 23 import org.openstreetmap.josm.data.coor.LatLon; 25 24 import org.openstreetmap.josm.data.projection.Projections; 25 import org.openstreetmap.josm.testutils.JOSMTestRules; 26 27 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 26 28 27 29 /** … … 33 35 * Setup test. 34 36 */ 35 @BeforeClass 36 public static void init() { 37 JOSMFixture.createUnitTestFixture().init(); 38 } 37 @Rule 38 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 39 public JOSMTestRules test = new JOSMTestRules(); 39 40 40 41 private DataSet my; -
trunk/test/unit/org/openstreetmap/josm/data/osm/FilterTest.java
r10758 r10945 13 13 import java.util.List; 14 14 15 import org.junit. BeforeClass;15 import org.junit.Rule; 16 16 import org.junit.Test; 17 import org.openstreetmap.josm.JOSMFixture;18 17 import org.openstreetmap.josm.actions.search.SearchAction.SearchMode; 19 18 import org.openstreetmap.josm.actions.search.SearchCompiler.ParseError; … … 21 20 import org.openstreetmap.josm.gui.progress.NullProgressMonitor; 22 21 import org.openstreetmap.josm.io.OsmReader; 22 import org.openstreetmap.josm.testutils.JOSMTestRules; 23 24 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 23 25 24 26 /** … … 30 32 * Setup test. 31 33 */ 32 @BeforeClass 33 public static void setUp() { 34 JOSMFixture.createUnitTestFixture().init(); 35 } 34 @Rule 35 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 36 public JOSMTestRules test = new JOSMTestRules(); 36 37 37 38 @Test -
trunk/test/unit/org/openstreetmap/josm/data/osm/MultipolygonBuilderTest.java
r10222 r10945 6 6 import java.io.InputStream; 7 7 8 import org.junit.BeforeClass;9 8 import org.junit.Rule; 10 9 import org.junit.Test; 11 import org.junit.rules.Timeout;12 import org.openstreetmap.josm.JOSMFixture;13 10 import org.openstreetmap.josm.TestUtils; 14 11 import org.openstreetmap.josm.io.OsmReader; 12 import org.openstreetmap.josm.testutils.JOSMTestRules; 15 13 16 14 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; … … 22 20 23 21 /** 24 * Global timeout applied to all test methods.22 * Setup test. 25 23 */ 26 24 @Rule 27 25 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 28 public Timeout globalTimeout = Timeout.seconds(15); 29 30 /** 31 * Setup test. 32 */ 33 @BeforeClass 34 public static void init() { 35 JOSMFixture.createUnitTestFixture().init(); 36 } 26 public JOSMTestRules test = new JOSMTestRules().projection().timeout(15000); 37 27 38 28 /** -
trunk/test/unit/org/openstreetmap/josm/data/osm/NodeTest.java
r9666 r10945 6 6 import static org.junit.Assert.assertNull; 7 7 8 import org.junit. BeforeClass;8 import org.junit.Rule; 9 9 import org.junit.Test; 10 import org.openstreetmap.josm.JOSMFixture;11 10 import org.openstreetmap.josm.data.Bounds; 12 11 import org.openstreetmap.josm.data.DataSource; 13 12 import org.openstreetmap.josm.data.coor.LatLon; 13 import org.openstreetmap.josm.testutils.JOSMTestRules; 14 15 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 14 16 15 17 /** … … 21 23 * Setup test. 22 24 */ 23 @BeforeClass 24 public static void setUpBeforeClass() { 25 JOSMFixture.createUnitTestFixture().init(); 26 } 25 @Rule 26 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 27 public JOSMTestRules test = new JOSMTestRules(); 27 28 28 29 /** -
trunk/test/unit/org/openstreetmap/josm/data/osm/OsmPrimitiveKeyHandlingTest.java
r10758 r10945 6 6 import static org.junit.Assert.assertTrue; 7 7 8 import org.junit. BeforeClass;8 import org.junit.Rule; 9 9 import org.junit.Test; 10 import org.openstreetmap.josm.JOSMFixture;11 10 import org.openstreetmap.josm.data.coor.LatLon; 11 import org.openstreetmap.josm.testutils.JOSMTestRules; 12 12 13 13 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; … … 22 22 * Setup test. 23 23 */ 24 @BeforeClass 25 public static void init() { 26 JOSMFixture.createUnitTestFixture().init(); 27 } 24 @Rule 25 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 26 public JOSMTestRules test = new JOSMTestRules(); 28 27 29 28 /** -
trunk/test/unit/org/openstreetmap/josm/data/osm/OsmPrimitiveTest.java
r10758 r10945 7 7 import org.junit.Assert; 8 8 import org.junit.BeforeClass; 9 import org.junit.Rule; 9 10 import org.junit.Test; 10 import org.openstreetmap.josm.JOSMFixture;11 11 import org.openstreetmap.josm.Main; 12 12 import org.openstreetmap.josm.data.coor.LatLon; 13 13 import org.openstreetmap.josm.data.projection.Projections; 14 import org.openstreetmap.josm.testutils.JOSMTestRules; 15 16 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 14 17 15 18 /** … … 21 24 * Setup test. 22 25 */ 23 @BeforeClass 24 public static void init() { 25 JOSMFixture.createUnitTestFixture().init(); 26 } 26 @Rule 27 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 28 public JOSMTestRules test = new JOSMTestRules(); 27 29 28 30 private void compareReferrers(OsmPrimitive actual, OsmPrimitive... expected) { -
trunk/test/unit/org/openstreetmap/josm/data/osm/OsmUtilsTest.java
r8857 r10945 5 5 import static org.junit.Assert.assertTrue; 6 6 7 import org.junit. BeforeClass;7 import org.junit.Rule; 8 8 import org.junit.Test; 9 import org.openstreetmap.josm.JOSMFixture; 9 import org.openstreetmap.josm.testutils.JOSMTestRules; 10 11 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 10 12 11 13 public class OsmUtilsTest { … … 14 16 * Setup test. 15 17 */ 16 @BeforeClass 17 public static void setUp() { 18 JOSMFixture.createUnitTestFixture().init(); 19 } 18 @Rule 19 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 20 public JOSMTestRules test = new JOSMTestRules(); 20 21 21 22 @Test -
trunk/test/unit/org/openstreetmap/josm/data/osm/QuadBucketsTest.java
r10904 r10945 13 13 import org.fest.reflect.reference.TypeRef; 14 14 import org.junit.Assert; 15 import org.junit. BeforeClass;15 import org.junit.Rule; 16 16 import org.junit.Test; 17 import org.openstreetmap.josm.JOSMFixture;18 17 import org.openstreetmap.josm.Main; 19 18 import org.openstreetmap.josm.data.coor.LatLon; … … 21 20 import org.openstreetmap.josm.gui.progress.NullProgressMonitor; 22 21 import org.openstreetmap.josm.io.OsmReader; 22 import org.openstreetmap.josm.testutils.JOSMTestRules; 23 24 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 23 25 24 26 /** … … 30 32 * Setup test. 31 33 */ 32 @BeforeClass 33 public static void init() { 34 JOSMFixture.createUnitTestFixture().init(); 35 } 34 @Rule 35 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 36 public JOSMTestRules test = new JOSMTestRules(); 36 37 37 38 private void removeAllTest(DataSet ds) { -
trunk/test/unit/org/openstreetmap/josm/data/osm/RelationTest.java
r10758 r10945 7 7 8 8 import org.junit.Assert; 9 import org.junit. BeforeClass;9 import org.junit.Rule; 10 10 import org.junit.Test; 11 import org.openstreetmap.josm.JOSMFixture;12 11 import org.openstreetmap.josm.data.coor.LatLon; 12 import org.openstreetmap.josm.testutils.JOSMTestRules; 13 14 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 13 15 14 16 public class RelationTest { … … 17 19 * Setup test. 18 20 */ 19 @BeforeClass 20 public static void setUp() { 21 JOSMFixture.createUnitTestFixture().init(); 22 } 21 @Rule 22 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 23 public JOSMTestRules test = new JOSMTestRules(); 23 24 24 25 @Test(expected = NullPointerException.class) -
trunk/test/unit/org/openstreetmap/josm/data/osm/WaySegmentTest.java
r9489 r10945 5 5 6 6 import org.junit.Assert; 7 import org.junit. Before;7 import org.junit.Rule; 8 8 import org.junit.Test; 9 import org.openstreetmap.josm.JOSMFixture;10 9 import org.openstreetmap.josm.data.coor.LatLon; 10 import org.openstreetmap.josm.testutils.JOSMTestRules; 11 12 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 11 13 12 14 /** … … 18 20 * Setup test. 19 21 */ 20 @Before 21 public void setUp() { 22 JOSMFixture.createUnitTestFixture().init(); 23 } 22 @Rule 23 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 24 public JOSMTestRules test = new JOSMTestRules(); 24 25 25 26 @Test -
trunk/test/unit/org/openstreetmap/josm/data/osm/history/HistoryNodeTest.java
r9214 r10945 9 9 import java.util.Map; 10 10 11 import org.junit. BeforeClass;11 import org.junit.Rule; 12 12 import org.junit.Test; 13 import org.openstreetmap.josm.JOSMFixture;14 13 import org.openstreetmap.josm.data.coor.LatLon; 15 14 import org.openstreetmap.josm.data.osm.Node; … … 17 16 import org.openstreetmap.josm.data.osm.User; 18 17 import org.openstreetmap.josm.gui.DefaultNameFormatter; 18 import org.openstreetmap.josm.testutils.JOSMTestRules; 19 20 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 19 21 20 22 /** … … 26 28 * Setup test. 27 29 */ 28 @BeforeClass 29 public static void init() { 30 JOSMFixture.createUnitTestFixture().init(); 31 } 30 @Rule 31 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 32 public JOSMTestRules test = new JOSMTestRules(); 32 33 33 34 private static HistoryNode create(Date d) { -
trunk/test/unit/org/openstreetmap/josm/data/osm/history/HistoryRelationTest.java
r10378 r10945 9 9 import java.util.Map; 10 10 11 import org.junit. BeforeClass;11 import org.junit.Rule; 12 12 import org.junit.Test; 13 import org.openstreetmap.josm.JOSMFixture;14 13 import org.openstreetmap.josm.data.osm.OsmPrimitiveType; 15 14 import org.openstreetmap.josm.data.osm.RelationMemberData; 16 15 import org.openstreetmap.josm.data.osm.User; 17 16 import org.openstreetmap.josm.gui.DefaultNameFormatter; 17 import org.openstreetmap.josm.testutils.JOSMTestRules; 18 19 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 18 20 19 21 /** … … 25 27 * Setup test. 26 28 */ 27 @BeforeClass 28 public static void init() { 29 JOSMFixture.createUnitTestFixture().init(); 30 } 29 @Rule 30 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 31 public JOSMTestRules test = new JOSMTestRules(); 31 32 32 33 private static HistoryRelation create(Date d) { -
trunk/test/unit/org/openstreetmap/josm/data/osm/history/HistoryWayTest.java
r10626 r10945 11 11 import java.util.Map; 12 12 13 import org.junit. BeforeClass;13 import org.junit.Rule; 14 14 import org.junit.Test; 15 import org.openstreetmap.josm.JOSMFixture;16 15 import org.openstreetmap.josm.Main; 17 16 import org.openstreetmap.josm.data.osm.OsmPrimitiveType; 18 17 import org.openstreetmap.josm.data.osm.User; 19 18 import org.openstreetmap.josm.gui.DefaultNameFormatter; 19 import org.openstreetmap.josm.testutils.JOSMTestRules; 20 21 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 20 22 21 23 /** … … 27 29 * Setup test. 28 30 */ 29 @BeforeClass 30 public static void init() { 31 JOSMFixture.createUnitTestFixture().init(); 32 } 31 @Rule 32 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 33 public JOSMTestRules test = new JOSMTestRules(); 33 34 34 35 private static HistoryWay create(Date d) { -
trunk/test/unit/org/openstreetmap/josm/data/osm/visitor/MergeSourceBuildingVisitorTest.java
r10378 r10945 9 9 import java.util.Collection; 10 10 11 import org.junit. BeforeClass;11 import org.junit.Rule; 12 12 import org.junit.Test; 13 import org.openstreetmap.josm.JOSMFixture;14 13 import org.openstreetmap.josm.data.coor.LatLon; 15 14 import org.openstreetmap.josm.data.osm.Changeset; … … 21 20 import org.openstreetmap.josm.data.osm.RelationMember; 22 21 import org.openstreetmap.josm.data.osm.Way; 22 import org.openstreetmap.josm.testutils.JOSMTestRules; 23 24 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 23 25 24 26 /** … … 40 42 * Setup test. 41 43 */ 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(); 46 47 47 48 @Test -
trunk/test/unit/org/openstreetmap/josm/data/validation/tests/DuplicateNodeTest.java
r10758 r10945 4 4 import static org.junit.Assert.assertEquals; 5 5 6 import org.junit. BeforeClass;6 import org.junit.Rule; 7 7 import org.junit.Test; 8 import org.openstreetmap.josm.JOSMFixture;9 8 import org.openstreetmap.josm.data.coor.LatLon; 10 9 import org.openstreetmap.josm.data.osm.DataSet; 11 10 import org.openstreetmap.josm.data.osm.Node; 12 11 import org.openstreetmap.josm.gui.progress.NullProgressMonitor; 12 import org.openstreetmap.josm.testutils.JOSMTestRules; 13 14 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 13 15 14 16 /** … … 20 22 * Setup test by initializing JOSM preferences and projection. 21 23 */ 22 @BeforeClass 23 public static void setUp() { 24 JOSMFixture.createUnitTestFixture().init(); 25 } 24 @Rule 25 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 26 public JOSMTestRules test = new JOSMTestRules(); 26 27 27 28 /** -
trunk/test/unit/org/openstreetmap/josm/data/validation/tests/InternetTagsTest.java
r9853 r10945 5 5 import static org.junit.Assert.assertNull; 6 6 7 import org.junit. BeforeClass;7 import org.junit.Rule; 8 8 import org.junit.Test; 9 import org.openstreetmap.josm.JOSMFixture;10 9 import org.openstreetmap.josm.data.osm.OsmUtils; 11 10 import org.openstreetmap.josm.data.validation.TestError; … … 13 12 import org.openstreetmap.josm.data.validation.routines.EmailValidator; 14 13 import org.openstreetmap.josm.data.validation.routines.UrlValidator; 14 import org.openstreetmap.josm.testutils.JOSMTestRules; 15 16 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 15 17 16 18 /** … … 19 21 public class InternetTagsTest { 20 22 21 private static InternetTags TEST;23 private static final InternetTags TEST = new InternetTags(); 22 24 23 25 /** 24 26 * Setup test by initializing JOSM preferences and projection. 25 27 */ 26 @BeforeClass 27 public static void setUp() { 28 JOSMFixture.createUnitTestFixture().init(); 29 TEST = new InternetTags(); 30 } 28 @Rule 29 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 30 public JOSMTestRules test = new JOSMTestRules(); 31 31 32 32 /** -
trunk/test/unit/org/openstreetmap/josm/data/validation/tests/LongSegmentTest.java
r10081 r10945 4 4 import static org.junit.Assert.assertEquals; 5 5 6 import org.junit. Before;6 import org.junit.Rule; 7 7 import org.junit.Test; 8 import org.openstreetmap.josm.JOSMFixture;9 8 import org.openstreetmap.josm.data.coor.LatLon; 10 9 import org.openstreetmap.josm.data.osm.Node; 11 10 import org.openstreetmap.josm.data.osm.Way; 11 import org.openstreetmap.josm.testutils.JOSMTestRules; 12 13 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 12 14 13 15 /** … … 19 21 * Setup test. 20 22 */ 21 @Before 22 public void setUp() { 23 JOSMFixture.createUnitTestFixture().init(); 24 } 23 @Rule 24 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 25 public JOSMTestRules test = new JOSMTestRules(); 25 26 26 27 private static int test(Way w) throws Exception { -
trunk/test/unit/org/openstreetmap/josm/data/validation/tests/MapCSSTagCheckerTest.java
r10758 r10945 14 14 import java.util.Set; 15 15 16 import org.junit. BeforeClass;16 import org.junit.Rule; 17 17 import org.junit.Test; 18 import org.openstreetmap.josm.JOSMFixture;19 18 import org.openstreetmap.josm.Main; 20 19 import org.openstreetmap.josm.command.ChangePropertyCommand; … … 31 30 import org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.TagCheck; 32 31 import org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.ParseException; 32 import org.openstreetmap.josm.testutils.JOSMTestRules; 33 34 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 33 35 34 36 /** … … 40 42 * Setup test. 41 43 */ 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(); 46 47 47 48 static MapCSSTagChecker buildTagChecker(String css) throws ParseException { -
trunk/test/unit/org/openstreetmap/josm/data/validation/tests/MultipolygonTestTest.java
r10222 r10945 15 15 import java.util.TreeSet; 16 16 17 import org.junit. BeforeClass;17 import org.junit.Rule; 18 18 import org.junit.Test; 19 import org.openstreetmap.josm.JOSMFixture;20 19 import org.openstreetmap.josm.data.coor.LatLon; 21 20 import org.openstreetmap.josm.data.osm.Node; … … 26 25 import org.openstreetmap.josm.gui.DefaultNameFormatter; 27 26 import org.openstreetmap.josm.gui.mappaint.ElemStyles; 28 import org.openstreetmap.josm.gui.mappaint.MapPaintStyles;29 27 import org.openstreetmap.josm.io.OsmReader; 28 import org.openstreetmap.josm.testutils.JOSMTestRules; 29 30 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 30 31 31 32 /** … … 39 40 /** 40 41 * Setup test. 41 * @throws Exception if test cannot be initialized42 42 */ 43 @BeforeClass 44 public static void setUp() throws Exception { 45 JOSMFixture.createUnitTestFixture().init(true); 46 MapPaintStyles.readFromPreferences(); 47 } 43 @Rule 44 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 45 public JOSMTestRules test = new JOSMTestRules().commands(); 48 46 49 47 private static Way createUnclosedWay(String tags) { -
trunk/test/unit/org/openstreetmap/josm/data/validation/tests/NameMismatchTest.java
r10758 r10945 6 6 import java.util.List; 7 7 8 import org.junit. Before;8 import org.junit.Rule; 9 9 import org.junit.Test; 10 import org.openstreetmap.josm.JOSMFixture;11 10 import org.openstreetmap.josm.data.osm.OsmUtils; 12 11 import org.openstreetmap.josm.data.validation.TestError; 12 import org.openstreetmap.josm.testutils.JOSMTestRules; 13 14 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 13 15 14 16 /** … … 20 22 * Setup test. 21 23 */ 22 @Before 23 public void setUp() { 24 JOSMFixture.createUnitTestFixture().init(); 25 } 24 @Rule 25 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 26 public JOSMTestRules test = new JOSMTestRules(); 26 27 27 28 List<TestError> test(String primitive) { -
trunk/test/unit/org/openstreetmap/josm/data/validation/tests/PublicTransportRouteTestTest.java
r10758 r10945 7 7 import java.util.List; 8 8 9 import org.junit. Before;9 import org.junit.Rule; 10 10 import org.junit.Test; 11 import org.openstreetmap.josm.JOSMFixture;12 11 import org.openstreetmap.josm.TestUtils; 13 12 import org.openstreetmap.josm.data.osm.Node; … … 15 14 import org.openstreetmap.josm.data.osm.RelationMember; 16 15 import org.openstreetmap.josm.data.osm.Way; 16 import org.openstreetmap.josm.testutils.JOSMTestRules; 17 18 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 17 19 18 20 /** … … 26 28 * Setup test. 27 29 */ 28 @Before 29 public void setUp() { 30 JOSMFixture.createUnitTestFixture().init(); 31 } 30 @Rule 31 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 32 public JOSMTestRules rules = new JOSMTestRules(); 32 33 33 34 /** -
trunk/test/unit/org/openstreetmap/josm/data/validation/tests/UntaggedNodeTest.java
r9693 r10945 8 8 import java.io.InputStream; 9 9 10 import org.junit. Before;10 import org.junit.Rule; 11 11 import org.junit.Test; 12 import org.openstreetmap.josm.JOSMFixture;13 12 import org.openstreetmap.josm.TestUtils; 14 13 import org.openstreetmap.josm.data.osm.DataSet; 15 14 import org.openstreetmap.josm.gui.progress.NullProgressMonitor; 16 15 import org.openstreetmap.josm.io.OsmReader; 16 import org.openstreetmap.josm.testutils.JOSMTestRules; 17 18 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 17 19 18 20 /** … … 21 23 public class UntaggedNodeTest { 22 24 23 private UntaggedNode test;25 private final UntaggedNode test = new UntaggedNode(); 24 26 25 27 /** 26 28 * Setup test. 27 29 */ 28 @Before 29 public void setUp() { 30 JOSMFixture.createUnitTestFixture().init(); 31 test = new UntaggedNode(); 32 } 30 @Rule 31 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 32 public JOSMTestRules rules = new JOSMTestRules(); 33 33 34 34 /** -
trunk/test/unit/org/openstreetmap/josm/data/validation/util/MultipleNameVisitorTest.java
r9666 r10945 6 6 import java.util.Arrays; 7 7 8 import org.junit. BeforeClass;8 import org.junit.Rule; 9 9 import org.junit.Test; 10 import org.openstreetmap.josm.JOSMFixture;11 10 import org.openstreetmap.josm.data.osm.Way; 11 import org.openstreetmap.josm.testutils.JOSMTestRules; 12 13 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 12 14 13 15 /** … … 19 21 * Setup test. 20 22 */ 21 @BeforeClass 22 public static void setUp() { 23 JOSMFixture.createUnitTestFixture().init(); 24 } 23 @Rule 24 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 25 public JOSMTestRules test = new JOSMTestRules().platform(); 25 26 26 27 /**
Note:
See TracChangeset
for help on using the changeset viewer.