Changeset 10945 in josm for trunk/test/unit/org/openstreetmap/josm/data/osm
- Timestamp:
- 2016-09-03T14:22:22+02:00 (10 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm/data/osm
- Files:
-
- 16 edited
-
APIDataSetTest.java (modified) (2 diffs)
-
BBoxTest.java (modified) (2 diffs)
-
DataSetMergerTest.java (modified) (2 diffs)
-
FilterTest.java (modified) (3 diffs)
-
MultipolygonBuilderTest.java (modified) (2 diffs)
-
NodeTest.java (modified) (2 diffs)
-
OsmPrimitiveKeyHandlingTest.java (modified) (2 diffs)
-
OsmPrimitiveTest.java (modified) (2 diffs)
-
OsmUtilsTest.java (modified) (2 diffs)
-
QuadBucketsTest.java (modified) (3 diffs)
-
RelationTest.java (modified) (2 diffs)
-
WaySegmentTest.java (modified) (2 diffs)
-
history/HistoryNodeTest.java (modified) (3 diffs)
-
history/HistoryRelationTest.java (modified) (2 diffs)
-
history/HistoryWayTest.java (modified) (2 diffs)
-
visitor/MergeSourceBuildingVisitorTest.java (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
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
Note:
See TracChangeset
for help on using the changeset viewer.
