Changeset 10962 in josm for trunk/test/unit/org/openstreetmap
- Timestamp:
- 2016-09-05T01:10:07+02:00 (8 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm
- Files:
-
- 1 added
- 75 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/MainTest.java
r10899 r10962 3 3 4 4 import static org.junit.Assert.assertEquals; 5 import static org.junit.Assert.assertNotNull; 5 6 import static org.junit.Assert.assertNull; 6 7 import static org.junit.Assert.assertTrue; 7 8 8 9 import java.util.Collection; 10 11 import javax.swing.UIManager; 9 12 10 13 import org.junit.BeforeClass; … … 67 70 assertTrue(warnings.contains("W: First line of warning message on several lines")); 68 71 } 72 73 /** 74 * Unit test of {@link Main#preConstructorInit}. 75 */ 76 @Test 77 public void testPreConstructorInit() { 78 Main.preConstructorInit(); 79 assertNotNull(Main.getProjection()); 80 assertEquals(Main.pref.get("laf", Main.platform.getDefaultStyle()), UIManager.getLookAndFeel().getClass().getCanonicalName()); 81 assertNotNull(Main.toolbar); 82 } 69 83 } -
trunk/test/unit/org/openstreetmap/josm/data/CustomConfiguratorTest.java
r10945 r10962 33 33 @Rule 34 34 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 35 public JOSMTestRules test = new JOSMTestRules().p latform();35 public JOSMTestRules test = new JOSMTestRules().preferences(); 36 36 37 37 /** -
trunk/test/unit/org/openstreetmap/josm/data/cache/JCSCacheManagerTest.java
r10945 r10962 27 27 @Rule 28 28 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 29 public JOSMTestRules test = new JOSMTestRules().p latform();29 public JOSMTestRules test = new JOSMTestRules().preferences(); 30 30 31 31 /** -
trunk/test/unit/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJobTest.java
r10945 r10962 73 73 @Rule 74 74 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 75 public JOSMTestRules test = new JOSMTestRules().p latform();75 public JOSMTestRules test = new JOSMTestRules().preferences(); 76 76 77 77 /** -
trunk/test/unit/org/openstreetmap/josm/data/validation/util/MultipleNameVisitorTest.java
r10945 r10962 23 23 @Rule 24 24 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 25 public JOSMTestRules test = new JOSMTestRules().p latform();25 public JOSMTestRules test = new JOSMTestRules().preferences(); 26 26 27 27 /** -
trunk/test/unit/org/openstreetmap/josm/gui/bbox/SizeButtonTest.java
r9954 r10962 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.TestUtils; 12 11 import org.openstreetmap.josm.gui.bbox.SizeButton.AccessibleSizeButton; 12 import org.openstreetmap.josm.testutils.JOSMTestRules; 13 14 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 13 15 14 16 /** … … 20 22 * Setup tests 21 23 */ 22 @BeforeClass 23 public static void setUpBeforeClass() { 24 JOSMFixture.createUnitTestFixture().init(true); 25 } 24 @Rule 25 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 26 public JOSMTestRules test = new JOSMTestRules().preferences(); 26 27 27 28 /** -
trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMergeModelTest.java
r10937 r10962 18 18 import javax.swing.DefaultListSelectionModel; 19 19 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.osm.Node; 25 24 import org.openstreetmap.josm.data.osm.Way; 26 25 import org.openstreetmap.josm.testutils.DatasetFactory; 27 26 import org.openstreetmap.josm.testutils.JOSMTestRules; 27 28 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 29 30 /** 31 * Unit tests of {@link NodeListMergeModel}. 32 */ 28 33 public class NodeListMergeModelTest { 29 34 … … 34 39 * Setup test. 35 40 */ 36 @BeforeClass 37 public static void init() { 38 JOSMFixture.createUnitTestFixture().init(); 39 } 41 @Rule 42 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 43 public JOSMTestRules test = new JOSMTestRules(); 40 44 41 45 @SuppressWarnings("unchecked") -
trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMergerTest.java
r9958 r10962 4 4 import static org.junit.Assert.assertNotNull; 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 setUpBeforeClass() { 20 JOSMFixture.createUnitTestFixture().init(); 21 } 20 @Rule 21 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 22 public JOSMTestRules test = new JOSMTestRules().preferences(); 22 23 23 24 /** -
trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMergeModelTest.java
r10758 r10962 10 10 11 11 import org.junit.Before; 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.conflict.Conflict; 16 15 import org.openstreetmap.josm.data.coor.LatLon; … … 21 20 import org.openstreetmap.josm.data.osm.Way; 22 21 import org.openstreetmap.josm.gui.conflict.pair.MergeDecisionType; 22 import org.openstreetmap.josm.testutils.JOSMTestRules; 23 23 24 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 25 26 /** 27 * Unit tests of {@link PropertiesMergeModel}. 28 */ 24 29 public class PropertiesMergeModelTest { 25 30 … … 45 50 * Setup test. 46 51 */ 47 @BeforeClass 48 public static void init() { 49 JOSMFixture.createUnitTestFixture().init(); 50 } 52 @Rule 53 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 54 public JOSMTestRules test = new JOSMTestRules(); 51 55 52 56 /** -
trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMergerTest.java
r9958 r10962 4 4 import static org.junit.Assert.assertNotNull; 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 setUpBeforeClass() { 20 JOSMFixture.createUnitTestFixture().init(); 21 } 20 @Rule 21 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 22 public JOSMTestRules test = new JOSMTestRules().preferences(); 22 23 23 24 /** -
trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberMergerTest.java
r9958 r10962 4 4 import static org.junit.Assert.assertNotNull; 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 setUpBeforeClass() { 20 JOSMFixture.createUnitTestFixture().init(); 21 } 20 @Rule 21 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 22 public JOSMTestRules test = new JOSMTestRules().preferences(); 22 23 23 24 /** -
trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberTableCellEditorTest.java
r9945 r10962 8 8 import java.awt.Component; 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.Node; 14 13 import org.openstreetmap.josm.data.osm.RelationMember; 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 setUpBeforeClass() { 26 JOSMFixture.createUnitTestFixture().init(); 27 } 26 @Rule 27 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 28 public JOSMTestRules test = new JOSMTestRules().preferences(); 28 29 29 30 /** -
trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberTableCellRendererTest.java
r9945 r10962 6 6 import javax.swing.JTable; 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.Node; 12 11 import org.openstreetmap.josm.data.osm.RelationMember; 13 12 import org.openstreetmap.josm.gui.conflict.pair.ListRole; 14 13 import org.openstreetmap.josm.gui.conflict.pair.nodes.NodeListMergeModel; 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 setUpBeforeClass() { 26 JOSMFixture.createUnitTestFixture().init(); 27 } 26 @Rule 27 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 28 public JOSMTestRules test = new JOSMTestRules().preferences(); 28 29 29 30 /** -
trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeItemTest.java
r10758 r10962 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.Main; 12 11 import org.openstreetmap.josm.data.osm.Node; 13 12 import org.openstreetmap.josm.gui.conflict.pair.MergeDecisionType; 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 init() { 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 @Test -
trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeModelTest.java
r10758 r10962 11 11 import java.util.Set; 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.data.osm.Node; 17 16 import org.openstreetmap.josm.gui.conflict.pair.MergeDecisionType; 17 import org.openstreetmap.josm.testutils.JOSMTestRules; 18 19 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 18 20 19 21 /** … … 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 @Test -
trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergerTest.java
r9958 r10962 4 4 import static org.junit.Assert.assertNotNull; 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 setUpBeforeClass() { 20 JOSMFixture.createUnitTestFixture().init(); 21 } 20 @Rule 21 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 22 public JOSMTestRules test = new JOSMTestRules().preferences(); 22 23 23 24 /** -
trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialogTest.java
r9849 r10962 8 8 import javax.swing.JSplitPane; 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.gui.conflict.tags.CombinePrimitiveResolverDialog.AutoAdjustingSplitPane; 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 init() { 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/gui/conflict/tags/MultiValueCellEditorTest.java
r9919 r10962 4 4 import static org.junit.Assert.assertNotNull; 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 setUpBeforeClass() { 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/gui/conflict/tags/MultiValueCellRendererTest.java
r9919 r10962 10 10 import javax.swing.JTable; 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.osm.Tag; 16 15 import org.openstreetmap.josm.data.osm.TagCollection; 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 setUpBeforeClass() { 28 JOSMFixture.createUnitTestFixture().init(); 29 } 28 @Rule 29 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 30 public JOSMTestRules test = new JOSMTestRules().preferences(); 30 31 31 32 /** -
trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialogTest.java
r9849 r10962 9 9 import java.awt.Insets; 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.gui.conflict.tags.PasteTagsConflictResolverDialog.StatisticsInfo; 16 15 import org.openstreetmap.josm.gui.conflict.tags.PasteTagsConflictResolverDialog.StatisticsInfoTable; 17 16 import org.openstreetmap.josm.gui.conflict.tags.PasteTagsConflictResolverDialog.StatisticsTableModel; 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 /** -
trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolverModelTest.java
r9958 r10962 10 10 import java.util.List; 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.coor.LatLon; 16 15 import org.openstreetmap.josm.data.osm.DataSet; … … 19 18 import org.openstreetmap.josm.data.osm.RelationMember; 20 19 import org.openstreetmap.josm.data.osm.Way; 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 init() { 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 List<Way> buildTestDataSet() { -
trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolverTest.java
r9958 r10962 4 4 import static org.junit.Assert.assertNotNull; 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 init() { 20 JOSMFixture.createUnitTestFixture().init(); 21 } 20 @Rule 21 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 22 public JOSMTestRules test = new JOSMTestRules().preferences(); 22 23 23 24 /** -
trunk/test/unit/org/openstreetmap/josm/gui/correction/RoleCorrectionTableTest.java
r10743 r10962 10 10 import java.util.Arrays; 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.correction.RoleCorrection; 16 15 import org.openstreetmap.josm.data.osm.Node; 17 16 import org.openstreetmap.josm.data.osm.Relation; 18 17 import org.openstreetmap.josm.data.osm.RelationMember; 18 import org.openstreetmap.josm.testutils.JOSMTestRules; 19 20 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 19 21 20 22 /** … … 26 28 * Setup tests 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 /** -
trunk/test/unit/org/openstreetmap/josm/gui/correction/TagCorrectionTableTest.java
r10743 r10962 10 10 import java.util.Arrays; 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.correction.TagCorrection; 15 import org.openstreetmap.josm.testutils.JOSMTestRules; 16 17 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 16 18 17 19 /** … … 23 25 * Setup tests 24 26 */ 25 @BeforeClass 26 public static void setUpBeforeClass() { 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/gui/datatransfer/RelationMemberTransferableTest.java
r10623 r10962 12 12 import java.util.Collections; 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.data.osm.Node; 18 17 import org.openstreetmap.josm.data.osm.PrimitiveData; … … 20 19 import org.openstreetmap.josm.data.osm.RelationMemberData; 21 20 import org.openstreetmap.josm.gui.datatransfer.data.PrimitiveTransferData; 21 import org.openstreetmap.josm.testutils.JOSMTestRules; 22 23 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 22 24 23 25 /** … … 29 31 * Setup tests 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(); 35 36 36 37 /** -
trunk/test/unit/org/openstreetmap/josm/gui/dialogs/ConflictDialogTest.java
r9669 r10962 8 8 import java.awt.image.BufferedImage; 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.data.coor.LatLon; … … 18 17 import org.openstreetmap.josm.data.osm.Way; 19 18 import org.openstreetmap.josm.gui.dialogs.ConflictDialog.ConflictPainter; 19 import org.openstreetmap.josm.testutils.JOSMTestRules; 20 21 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 20 22 21 23 /** … … 27 29 * Setup tests 28 30 */ 29 @BeforeClass 30 public static void setUpBeforeClass() { 31 JOSMFixture.createUnitTestFixture().init(true); 32 } 31 @Rule 32 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 33 public JOSMTestRules test = new JOSMTestRules().platform().commands(); 33 34 34 35 /** -
trunk/test/unit/org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDialogTest.java
r10888 r10962 9 9 import javax.swing.JPanel; 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.data.coor.LatLon; … … 18 17 import org.openstreetmap.josm.data.osm.User; 19 18 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 19 import org.openstreetmap.josm.testutils.JOSMTestRules; 20 21 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 20 22 21 23 /** … … 27 29 * Setup tests 28 30 */ 29 @BeforeClass 30 public static void setUpBeforeClass() { 31 JOSMFixture.createUnitTestFixture().init(true); 32 } 31 @Rule 32 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 33 public JOSMTestRules test = new JOSMTestRules().commands(); 33 34 34 35 /** -
trunk/test/unit/org/openstreetmap/josm/gui/dialogs/MapPaintDialogTest.java
r9996 r10962 2 2 package org.openstreetmap.josm.gui.dialogs; 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.Main; 7 import org.openstreetmap.josm.testutils.JOSMTestRules; 8 9 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 8 10 9 11 /** … … 15 17 * Setup tests 16 18 */ 17 @BeforeClass 18 public static void setUpBeforeClass() { 19 JOSMFixture.createUnitTestFixture().init(true); 20 } 19 @Rule 20 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 21 public JOSMTestRules test = new JOSMTestRules().commands(); 21 22 22 23 /** -
trunk/test/unit/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManagerTest.java
r9916 r10962 7 7 import java.util.List; 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; 13 12 import org.openstreetmap.josm.gui.dialogs.changeset.ChangesetCacheManager.CancelAction; … … 20 19 import org.openstreetmap.josm.gui.dialogs.changeset.ChangesetCacheManager.RemoveFromCacheAction; 21 20 import org.openstreetmap.josm.gui.dialogs.changeset.ChangesetCacheManager.ShowDetailAction; 21 import org.openstreetmap.josm.testutils.JOSMTestRules; 22 23 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 22 24 23 25 /** … … 29 31 * Setup tests 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().preferences(); 35 36 36 37 /** -
trunk/test/unit/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentPanelTest.java
r9669 r10962 4 4 import static org.junit.Assert.assertNotNull; 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 tests 17 19 */ 18 @BeforeClass 19 public static void setUpBeforeClass() { 20 JOSMFixture.createUnitTestFixture().init(); 21 } 20 @Rule 21 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 22 public JOSMTestRules test = new JOSMTestRules().preferences(); 22 23 23 24 /** -
trunk/test/unit/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetDetailPanelTest.java
r9669 r10962 4 4 import static org.junit.Assert.assertNotNull; 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 tests 17 19 */ 18 @BeforeClass 19 public static void setUpBeforeClass() { 20 JOSMFixture.createUnitTestFixture().init(); 21 } 20 @Rule 21 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 22 public JOSMTestRules test = new JOSMTestRules().preferences(); 22 23 23 24 /** -
trunk/test/unit/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetDiscussionPanelTest.java
r9669 r10962 4 4 import static org.junit.Assert.assertNotNull; 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 tests 17 19 */ 18 @BeforeClass 19 public static void setUpBeforeClass() { 20 JOSMFixture.createUnitTestFixture().init(); 21 } 20 @Rule 21 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 22 public JOSMTestRules test = new JOSMTestRules().preferences(); 22 23 23 24 /** -
trunk/test/unit/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetTagsPanelTest.java
r9669 r10962 4 4 import static org.junit.Assert.assertNotNull; 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 tests 17 19 */ 18 @BeforeClass 19 public static void setUpBeforeClass() { 20 JOSMFixture.createUnitTestFixture().init(); 21 } 20 @Rule 21 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 22 public JOSMTestRules test = new JOSMTestRules().preferences(); 22 23 23 24 /** -
trunk/test/unit/org/openstreetmap/josm/gui/dialogs/changeset/query/AdvancedChangesetQueryPanelTest.java
r9669 r10962 4 4 import static org.junit.Assert.assertNotNull; 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 setUpBeforeClass() { 20 JOSMFixture.createUnitTestFixture().init(); 21 } 20 @Rule 21 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 22 public JOSMTestRules test = new JOSMTestRules().preferences(); 22 23 23 24 /** -
trunk/test/unit/org/openstreetmap/josm/gui/dialogs/changeset/query/BasicChangesetQueryPanelTest.java
r9669 r10962 4 4 import static org.junit.Assert.assertNotNull; 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 setUpBeforeClass() { 20 JOSMFixture.createUnitTestFixture().init(); 21 } 20 @Rule 21 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 22 public JOSMTestRules test = new JOSMTestRules().preferences(); 22 23 23 24 /** -
trunk/test/unit/org/openstreetmap/josm/gui/dialogs/changeset/query/UrlBasedQueryPanelTest.java
r9669 r10962 4 4 import static org.junit.Assert.assertNotNull; 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 setUpBeforeClass() { 20 JOSMFixture.createUnitTestFixture().init(); 21 } 20 @Rule 21 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 22 public JOSMTestRules test = new JOSMTestRules().preferences(); 22 23 23 24 /** -
trunk/test/unit/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialogTest.java
r10127 r10962 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.data.coor.LatLon; 14 13 import org.openstreetmap.josm.data.osm.DataSet; … … 17 16 import org.openstreetmap.josm.data.osm.OsmPrimitiveComparator; 18 17 import org.openstreetmap.josm.data.osm.Way; 18 import org.openstreetmap.josm.testutils.JOSMTestRules; 19 20 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 19 21 20 22 /** … … 26 28 * Setup tests 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 String createSearchSetting(DataSet ds, boolean sameType) { -
trunk/test/unit/org/openstreetmap/josm/gui/dialogs/properties/RecentTagCollectionTest.java
r10758 r10962 9 9 import java.util.Collections; 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.actions.search.SearchAction; 15 14 import org.openstreetmap.josm.actions.search.SearchCompiler; 16 15 import org.openstreetmap.josm.data.osm.Tag; 17 16 import org.openstreetmap.josm.data.preferences.CollectionProperty; 17 import org.openstreetmap.josm.testutils.JOSMTestRules; 18 19 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 18 20 19 21 /** … … 25 27 * Setup tests 26 28 */ 27 @BeforeClass 28 public static void setUpBeforeClass() { 29 JOSMFixture.createUnitTestFixture().init(); 30 } 29 @Rule 30 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 31 public JOSMTestRules test = new JOSMTestRules().preferences(); 31 32 32 33 /** -
trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowserTest.java
r9775 r10962 4 4 import static org.junit.Assert.assertNotNull; 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.DataSet; 10 9 import org.openstreetmap.josm.data.osm.Relation; 11 10 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 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 setUpBeforeClass() { 23 JOSMFixture.createUnitTestFixture().init(); 24 } 23 @Rule 24 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 25 public JOSMTestRules test = new JOSMTestRules().preferences(); 25 26 26 27 /** -
trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditorTest.java
r10113 r10962 9 9 import javax.swing.JPanel; 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.DataSet; 15 14 import org.openstreetmap.josm.data.osm.Node; … … 28 27 import org.openstreetmap.josm.gui.tagging.TagEditorPanel; 29 28 import org.openstreetmap.josm.gui.tagging.ac.AutoCompletingTextField; 29 import org.openstreetmap.josm.testutils.JOSMTestRules; 30 31 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 30 32 31 33 /** … … 37 39 * Setup test. 38 40 */ 39 @BeforeClass 40 public static void setUpBeforeClass() { 41 JOSMFixture.createUnitTestFixture().init(true); 42 } 41 @Rule 42 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 43 public JOSMTestRules test = new JOSMTestRules().preferences().platform().commands(); 43 44 44 45 /** -
trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/MemberTableLinkedCellRendererTest.java
r9907 r10962 6 6 import javax.swing.JTable; 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.TestUtils; 12 11 import org.openstreetmap.josm.gui.dialogs.relation.sort.WayConnectionType; 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 setUpBeforeClass() { 24 JOSMFixture.createUnitTestFixture().init(); 25 } 24 @Rule 25 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 26 public JOSMTestRules test = new JOSMTestRules().preferences(); 26 27 27 28 /** -
trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/MemberTableMemberCellRendererTest.java
r9907 r10962 6 6 import javax.swing.JTable; 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.DataSet; 12 11 import org.openstreetmap.josm.data.osm.Node; 13 12 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 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().preferences(); 27 28 28 29 /** -
trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/MemberTableModelTest.java
r9669 r10962 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.data.osm.Node; 14 13 import org.openstreetmap.josm.data.osm.OsmPrimitive; 15 14 import org.openstreetmap.josm.data.osm.Tag; 16 15 import org.openstreetmap.josm.gui.tagging.presets.TaggingPresetHandler; 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 setUpBeforeClass() { 28 JOSMFixture.createUnitTestFixture().init(); 29 } 28 @Rule 29 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 30 public JOSMTestRules test = new JOSMTestRules(); 30 31 31 32 /** -
trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/MemberTableRoleCellRendererTest.java
r9907 r10962 6 6 import javax.swing.JTable; 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.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 setUpBeforeClass() { 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/gui/dialogs/relation/ReferringRelationsBrowserTest.java
r9775 r10962 2 2 package org.openstreetmap.josm.gui.dialogs.relation; 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.osm.DataSet; 8 7 import org.openstreetmap.josm.data.osm.Relation; 9 8 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 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 setUpBeforeClass() { 21 JOSMFixture.createUnitTestFixture().init(); 22 } 21 @Rule 22 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 23 public JOSMTestRules test = new JOSMTestRules().preferences(); 23 24 24 25 /** -
trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/RelationTreeCellRendererTest.java
r9907 r10962 6 6 import javax.swing.JTree; 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.Relation; 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 setUpBeforeClass() { 23 JOSMFixture.createUnitTestFixture().init(); 24 } 23 @Rule 24 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 25 public JOSMTestRules test = new JOSMTestRules().preferences(); 25 26 26 27 /** -
trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/SelectionTableCellRendererTest.java
r10072 r10962 6 6 import javax.swing.JTable; 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.Node; 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 setUpBeforeClass() { 23 JOSMFixture.createUnitTestFixture().init(); 24 } 23 @Rule 24 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 25 public JOSMTestRules test = new JOSMTestRules().preferences(); 25 26 26 27 /** -
trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/SelectionTableTest.java
r10436 r10962 8 8 import java.awt.event.MouseListener; 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.data.coor.LatLon; … … 19 18 import org.openstreetmap.josm.gui.dialogs.relation.SelectionTable.DoubleClickAdapter; 20 19 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 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(); 34 35 35 36 /** -
trunk/test/unit/org/openstreetmap/josm/gui/dialogs/validator/ValidatorTreePanelTest.java
r10880 r10962 12 12 import java.util.Set; 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.data.osm.Node; 18 17 import org.openstreetmap.josm.data.osm.OsmPrimitive; 19 18 import org.openstreetmap.josm.data.validation.Severity; 20 19 import org.openstreetmap.josm.data.validation.TestError; 20 import org.openstreetmap.josm.testutils.JOSMTestRules; 21 22 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 21 23 22 24 /** … … 28 30 * Setup tests 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().preferences(); 34 35 35 36 /** -
trunk/test/unit/org/openstreetmap/josm/gui/download/BookmarkSelectionTest.java
r9669 r10962 2 2 package org.openstreetmap.josm.gui.download; 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.Bounds; 7 import org.openstreetmap.josm.testutils.JOSMTestRules; 8 9 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 8 10 9 11 /** … … 15 17 * Setup tests 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().preferences(); 21 22 22 23 /** -
trunk/test/unit/org/openstreetmap/josm/gui/download/BoundingBoxSelectionTest.java
r9669 r10962 2 2 package org.openstreetmap.josm.gui.download; 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.Bounds; 7 import org.openstreetmap.josm.testutils.JOSMTestRules; 8 9 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 8 10 9 11 /** … … 15 17 * Setup tests 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().preferences(); 21 22 22 23 /** -
trunk/test/unit/org/openstreetmap/josm/gui/download/PlaceSelectionTest.java
r9669 r10962 2 2 package org.openstreetmap.josm.gui.download; 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.Bounds; 7 import org.openstreetmap.josm.testutils.JOSMTestRules; 8 9 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 8 10 9 11 /** … … 15 17 * Setup tests 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().preferences(); 21 22 22 23 /** -
trunk/test/unit/org/openstreetmap/josm/gui/download/TileSelectionTest.java
r9669 r10962 2 2 package org.openstreetmap.josm.gui.download; 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.Bounds; 7 import org.openstreetmap.josm.testutils.JOSMTestRules; 8 9 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 8 10 9 11 /** … … 15 17 * Setup tests 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().preferences(); 21 22 22 23 /** -
trunk/test/unit/org/openstreetmap/josm/gui/help/HelpBrowserTest.java
r10103 r10962 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;9 import org.openstreetmap.josm.testutils.JOSMTestRules; 10 10 import org.openstreetmap.josm.tools.LanguageInfo.LocaleType; 11 12 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 11 13 12 14 /** … … 22 24 * Setup tests 23 25 */ 24 @BeforeClass 25 public static void setUpBeforeClass() { 26 JOSMFixture.createUnitTestFixture().init(); 27 } 26 @Rule 27 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 28 public JOSMTestRules test = new JOSMTestRules().preferences().platform(); 28 29 29 30 static IHelpBrowser newHelpBrowser() { -
trunk/test/unit/org/openstreetmap/josm/gui/help/HelpContentReaderTest.java
r10103 r10962 4 4 import static org.junit.Assert.assertFalse; 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 tests 17 19 */ 18 @BeforeClass 19 public static void setUpBeforeClass() { 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/gui/history/CoordinateInfoViewerTest.java
r10108 r10962 4 4 import static org.junit.Assert.assertNotNull; 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 setUpBeforeClass() { 20 JOSMFixture.createUnitTestFixture().init(); 21 } 20 @Rule 21 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 22 public JOSMTestRules test = new JOSMTestRules().preferences(); 22 23 23 24 /** -
trunk/test/unit/org/openstreetmap/josm/gui/history/HistoryBrowserDialogTest.java
r10108 r10962 6 6 import java.util.Date; 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.OsmPrimitiveType; 12 11 import org.openstreetmap.josm.data.osm.User; … … 15 14 import org.openstreetmap.josm.data.osm.history.HistoryRelation; 16 15 import org.openstreetmap.josm.data.osm.history.HistoryWay; 16 import org.openstreetmap.josm.testutils.JOSMTestRules; 17 17 import org.openstreetmap.josm.tools.date.DateUtils; 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 setUpBeforeClass() { 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 /** -
trunk/test/unit/org/openstreetmap/josm/gui/history/HistoryBrowserModelTest.java
r10195 r10962 8 8 import static org.junit.Assert.assertTrue; 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.Node; 14 13 import org.openstreetmap.josm.data.osm.OsmPrimitiveType; … … 20 19 import org.openstreetmap.josm.gui.history.HistoryBrowserModel.TagTableModel; 21 20 import org.openstreetmap.josm.gui.history.HistoryBrowserModel.VersionTableModel; 21 import org.openstreetmap.josm.testutils.JOSMTestRules; 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(true); 34 } 33 @Rule 34 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 35 public JOSMTestRules test = new JOSMTestRules().preferences().devAPI(); 35 36 36 37 /** -
trunk/test/unit/org/openstreetmap/josm/gui/history/HistoryLoadTaskTest.java
r10006 r10962 7 7 import java.io.InputStream; 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.TestUtils; 13 12 import org.openstreetmap.josm.data.osm.Node; … … 23 22 import org.openstreetmap.josm.io.OsmServerHistoryReader; 24 23 import org.openstreetmap.josm.io.OsmTransferException; 24 import org.openstreetmap.josm.testutils.JOSMTestRules; 25 25 import org.xml.sax.SAXException; 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 setUpBeforeClass() { 37 JOSMFixture.createUnitTestFixture().init(); 38 } 37 @Rule 38 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 39 public JOSMTestRules test = new JOSMTestRules().preferences().devAPI(); 39 40 40 41 /** -
trunk/test/unit/org/openstreetmap/josm/gui/history/NodeListViewerTest.java
r9816 r10962 4 4 import static org.junit.Assert.assertNotNull; 5 5 6 import org.junit.Rule; 6 7 import org.junit.Test; 8 import org.openstreetmap.josm.testutils.JOSMTestRules; 9 10 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 7 11 8 12 /** … … 10 14 */ 11 15 public class NodeListViewerTest { 16 17 /** 18 * Setup test. 19 */ 20 @Rule 21 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 22 public JOSMTestRules test = new JOSMTestRules().preferences(); 12 23 13 24 /** -
trunk/test/unit/org/openstreetmap/josm/gui/io/ActionFlagsTableCellTest.java
r9909 r10962 10 10 import javax.swing.JTable; 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.osm.DataSet; 16 15 import org.openstreetmap.josm.gui.layer.AbstractModifiableLayer; 17 16 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 17 import org.openstreetmap.josm.testutils.JOSMTestRules; 18 19 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 18 20 19 21 /** … … 24 26 * Setup test. 25 27 */ 26 @BeforeClass 27 public static void setUpBeforeClass() { 28 JOSMFixture.createUnitTestFixture().init(false); 29 } 28 @Rule 29 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 30 public JOSMTestRules test = new JOSMTestRules(); 30 31 31 32 /** -
trunk/test/unit/org/openstreetmap/josm/gui/io/BasicUploadSettingsPanelTest.java
r9958 r10962 4 4 import static org.junit.Assert.assertNotNull; 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 tests 17 19 */ 18 @BeforeClass 19 public static void setUpBeforeClass() { 20 JOSMFixture.createUnitTestFixture().init(); 21 } 20 @Rule 21 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 22 public JOSMTestRules test = new JOSMTestRules().preferences(); 22 23 23 24 /** -
trunk/test/unit/org/openstreetmap/josm/gui/io/ChangesetCellRendererTest.java
r9909 r10962 6 6 import javax.swing.JList; 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.Changeset; 11 import org.openstreetmap.josm.testutils.JOSMTestRules; 12 13 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 12 14 13 15 /** … … 18 20 * Setup test. 19 21 */ 20 @BeforeClass 21 public static void setUpBeforeClass() { 22 JOSMFixture.createUnitTestFixture().init(false); 23 } 22 @Rule 23 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 24 public JOSMTestRules test = new JOSMTestRules().preferences(); 24 25 25 26 /** -
trunk/test/unit/org/openstreetmap/josm/gui/io/ChangesetManagementPanelTest.java
r9958 r10962 4 4 import static org.junit.Assert.assertNotNull; 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 tests 17 19 */ 18 @BeforeClass 19 public static void setUpBeforeClass() { 20 JOSMFixture.createUnitTestFixture().init(); 21 } 20 @Rule 21 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 22 public JOSMTestRules test = new JOSMTestRules().preferences(); 22 23 23 24 /** -
trunk/test/unit/org/openstreetmap/josm/gui/io/CredentialDialogTest.java
r9776 r10962 7 7 import static org.junit.Assert.assertTrue; 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.gui.io.CredentialDialog.CredentialPanel; 12 import org.openstreetmap.josm.testutils.JOSMTestRules; 13 14 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 13 15 14 16 /** … … 20 22 * Setup tests 21 23 */ 22 @BeforeClass 23 public static void setUpBeforeClass() { 24 JOSMFixture.createUnitTestFixture().init(); 25 } 24 @Rule 25 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 26 public JOSMTestRules test = new JOSMTestRules().preferences(); 26 27 27 28 /** -
trunk/test/unit/org/openstreetmap/josm/gui/io/LayerNameAndFilePathTableCellTest.java
r9909 r10962 10 10 import javax.swing.JTable; 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.osm.DataSet; 16 15 import org.openstreetmap.josm.gui.layer.AbstractModifiableLayer; 17 16 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 17 import org.openstreetmap.josm.testutils.JOSMTestRules; 18 19 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 18 20 19 21 /** … … 24 26 * Setup test. 25 27 */ 26 @BeforeClass 27 public static void setUpBeforeClass() { 28 JOSMFixture.createUnitTestFixture().init(false); 29 } 28 @Rule 29 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 30 public JOSMTestRules test = new JOSMTestRules().preferences(); 30 31 31 32 /** -
trunk/test/unit/org/openstreetmap/josm/gui/io/SaveLayerInfoTest.java
r9909 r10962 7 7 import java.io.File; 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.DataSet; 13 12 import org.openstreetmap.josm.gui.layer.AbstractModifiableLayer; 14 13 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 14 import org.openstreetmap.josm.testutils.JOSMTestRules; 15 15 16 16 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; … … 23 23 * Setup test. 24 24 */ 25 @BeforeClass 26 public static void setUpBeforeClass() { 27 JOSMFixture.createUnitTestFixture().init(false); 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/gui/io/SaveLayersDialogTest.java
r9958 r10962 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.data.osm.DataSet; 14 13 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 14 import org.openstreetmap.josm.testutils.JOSMTestRules; 15 16 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 15 17 16 18 /** … … 22 24 * Setup tests 23 25 */ 24 @BeforeClass 25 public static void setUpBeforeClass() { 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 /** -
trunk/test/unit/org/openstreetmap/josm/gui/io/TagSettingsPanelTest.java
r9958 r10962 4 4 import static org.junit.Assert.assertNotNull; 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 tests 17 19 */ 18 @BeforeClass 19 public static void setUpBeforeClass() { 20 JOSMFixture.createUnitTestFixture().init(); 21 } 20 @Rule 21 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 22 public JOSMTestRules test = new JOSMTestRules().preferences(); 22 23 23 24 /** -
trunk/test/unit/org/openstreetmap/josm/gui/io/UploadAndSaveProgressRendererTest.java
r9996 r10962 9 9 import javax.swing.JPanel; 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.gui.io.SaveLayersModel.Mode; 14 import org.openstreetmap.josm.testutils.JOSMTestRules; 15 16 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 15 17 16 18 /** … … 22 24 * Setup tests 23 25 */ 24 @BeforeClass 25 public static void setUpBeforeClass() { 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 /** -
trunk/test/unit/org/openstreetmap/josm/gui/io/UploadDialogTest.java
r10105 r10962 8 8 import java.util.concurrent.ConcurrentHashMap; 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 tests 21 23 */ 22 @BeforeClass 23 public static void setUpBeforeClass() { 24 JOSMFixture.createUnitTestFixture().init(); 25 } 24 @Rule 25 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 26 public JOSMTestRules test = new JOSMTestRules().preferences(); 26 27 27 28 private static IUploadDialog newUploadDialog(final String comment, final String source) { -
trunk/test/unit/org/openstreetmap/josm/gui/io/UploadParameterSummaryPanelTest.java
r9958 r10962 4 4 import static org.junit.Assert.assertNotNull; 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 tests 17 19 */ 18 @BeforeClass 19 public static void setUpBeforeClass() { 20 JOSMFixture.createUnitTestFixture().init(); 21 } 20 @Rule 21 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 22 public JOSMTestRules test = new JOSMTestRules().preferences(); 22 23 23 24 /** -
trunk/test/unit/org/openstreetmap/josm/gui/io/UploadPrimitivesTaskTest.java
r9816 r10962 4 4 import static org.junit.Assert.assertNotNull; 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.Changeset; 10 9 import org.openstreetmap.josm.data.osm.DataSet; 11 10 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 11 import org.openstreetmap.josm.testutils.JOSMTestRules; 12 13 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 12 14 13 15 /** … … 19 21 * Setup tests 20 22 */ 21 @BeforeClass 22 public static void setUpBeforeClass() { 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/gui/io/UploadStrategySelectionPanelTest.java
r9841 r10962 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 import org.openstreetmap.josm.Main; 10 import org.openstreetmap.josm.io.OsmApi; 11 import org.openstreetmap.josm.io.OsmApiInitializationException; 12 import org.openstreetmap.josm.io.OsmTransferCanceledException; 8 import org.openstreetmap.josm.testutils.JOSMTestRules; 9 10 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 13 11 14 12 /** … … 20 18 * Setup tests 21 19 */ 22 @BeforeClass 23 public static void setUpBeforeClass() { 24 JOSMFixture.createUnitTestFixture().init(); 25 try { 26 OsmApi.getOsmApi().initialize(null); 27 } catch (OsmTransferCanceledException | OsmApiInitializationException e) { 28 Main.error(e); 29 } 30 } 20 @Rule 21 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 22 public JOSMTestRules test = new JOSMTestRules().preferences().devAPI(); 31 23 32 24 /** -
trunk/test/unit/org/openstreetmap/josm/gui/io/UploadedObjectsSummaryPanelTest.java
r9958 r10962 4 4 import static org.junit.Assert.assertNotNull; 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 tests 17 19 */ 18 @BeforeClass 19 public static void setUpBeforeClass() { 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 /**
Note:
See TracChangeset
for help on using the changeset viewer.