Changeset 17275 in josm for trunk/test/unit/org/openstreetmap/josm/gui/tagging
- Timestamp:
- 2020-10-28T20:41:00+01:00 (4 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm/gui/tagging
- Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/gui/tagging/TagEditorModelTest.java
r9816 r17275 2 2 package org.openstreetmap.josm.gui.tagging; 3 3 4 import static org.junit. Assert.assertEquals;4 import static org.junit.jupiter.api.Assertions.assertEquals; 5 5 6 import org.junit. Test;6 import org.junit.jupiter.api.Test; 7 7 8 8 /** 9 9 * Unit tests of {@link TagEditorModel} class. 10 10 */ 11 publicclass TagEditorModelTest {11 class TagEditorModelTest { 12 12 13 13 /** … … 15 15 */ 16 16 @Test 17 publicvoid testTagEditorModel() {17 void testTagEditorModel() { 18 18 TagEditorModel tem = new TagEditorModel(); 19 19 tem.add(null, null); -
trunk/test/unit/org/openstreetmap/josm/gui/tagging/TagModelTest.java
r9816 r17275 2 2 package org.openstreetmap.josm.gui.tagging; 3 3 4 import static org.junit. Assert.assertEquals;5 import static org.junit. Assert.assertTrue;4 import static org.junit.jupiter.api.Assertions.assertEquals; 5 import static org.junit.jupiter.api.Assertions.assertTrue; 6 6 7 import org.junit. Test;7 import org.junit.jupiter.api.Test; 8 8 9 9 /** 10 10 * Unit tests of {@link TagModel} class. 11 11 */ 12 publicclass TagModelTest {12 class TagModelTest { 13 13 14 14 /** … … 16 16 */ 17 17 @Test 18 publicvoid testTagModelSingleValue() {18 void testTagModelSingleValue() { 19 19 TagModel tm = new TagModel(); 20 20 assertEquals("", tm.getName()); … … 43 43 */ 44 44 @Test 45 publicvoid testTagModelMultipleValues() {45 void testTagModelMultipleValues() { 46 46 TagModel tm = new TagModel("key2", "val2"); 47 47 assertEquals("key2", tm.getName()); -
trunk/test/unit/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionManagerTest.java
r14503 r17275 2 2 package org.openstreetmap.josm.gui.tagging.ac; 3 3 4 import org.junit. Rule;5 import org.junit. Test;4 import org.junit.jupiter.api.extension.RegisterExtension; 5 import org.junit.jupiter.api.Test; 6 6 import org.openstreetmap.josm.TestUtils; 7 7 import org.openstreetmap.josm.data.osm.DataSet; … … 17 17 * Unit tests of {@link AutoCompletionManager} class. 18 18 */ 19 publicclass AutoCompletionManagerTest {19 class AutoCompletionManagerTest { 20 20 21 21 /** 22 22 * Setup rule 23 23 */ 24 @R ule24 @RegisterExtension 25 25 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 26 26 public JOSMTestRules test = new JOSMTestRules(); … … 30 30 */ 31 31 @Test 32 publicvoid testTicket17064() {32 void testTicket17064() { 33 33 DataSet ds = new DataSet(); 34 34 OsmDataLayer layer = new OsmDataLayer(ds, "testTicket17064", null); … … 42 42 */ 43 43 @Test 44 publicvoid testEqualsContract() {44 void testEqualsContract() { 45 45 TestUtils.assumeWorkingEqualsVerifier(); 46 46 EqualsVerifier.forClass(UserInputTag.class).usingGetClass() -
trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/PresetClassificationsTest.java
r10638 r17275 2 2 package org.openstreetmap.josm.gui.tagging.presets; 3 3 4 import static org.junit. Assert.assertFalse;5 import static org.junit. Assert.assertTrue;4 import static org.junit.jupiter.api.Assertions.assertFalse; 5 import static org.junit.jupiter.api.Assertions.assertTrue; 6 6 7 7 import java.io.IOException; … … 12 12 import java.util.stream.Collectors; 13 13 14 import org.junit. BeforeClass;15 import org.junit. Test;14 import org.junit.jupiter.api.BeforeAll; 15 import org.junit.jupiter.api.Test; 16 16 import org.openstreetmap.josm.JOSMFixture; 17 17 import org.openstreetmap.josm.data.osm.Node; … … 26 26 * Unit tests of {@link PresetClassifications} class. 27 27 */ 28 publicclass PresetClassificationsTest {28 class PresetClassificationsTest { 29 29 30 30 static final PresetClassifications classifications = new PresetClassifications(); … … 35 35 * @throws IOException if any I/O error occurs 36 36 */ 37 @Before Class37 @BeforeAll 38 38 public static void setUp() throws IOException, SAXException { 39 39 JOSMFixture.createUnitTestFixture().init(); … … 55 55 */ 56 56 @Test 57 publicvoid testBuilding() {57 void testBuilding() { 58 58 final Way w = new Way(); 59 59 final Node n1 = new Node(); … … 61 61 w.addNode(new Node()); 62 62 w.addNode(new Node()); 63 assertFalse( "unclosed way should not match building preset", getMatchingPresetNames("building", w).contains("Building"));63 assertFalse(getMatchingPresetNames("building", w).contains("Building"), "unclosed way should not match building preset"); 64 64 w.addNode(n1); 65 assertTrue( "closed way should match building preset", getMatchingPresetNames("building", w).contains("Building"));65 assertTrue(getMatchingPresetNames("building", w).contains("Building"), "closed way should match building preset"); 66 66 } 67 67 … … 70 70 */ 71 71 @Test 72 publicvoid testRelationsForTram() {72 void testRelationsForTram() { 73 73 final OsmPrimitive tram = OsmUtils.createPrimitive("way railway=tram"); 74 assertTrue("railway=tram should match 'Railway Route' for relation creation", getMatchingPresetNames("route", tram) 75 .contains("Railway Route")); 76 assertTrue("railway=tram should match 'Public Transport Route (Rail)' for relation creation", getMatchingPresetNames("route", tram) 77 .contains("Public Transport Route (Rail)")); 78 assertFalse("railway=tram should not match 'Bus'", getMatchingPresetNames("route", tram).toString().contains("Bus")); 74 assertTrue(getMatchingPresetNames("route", tram).contains("Railway Route"), 75 "railway=tram should match 'Railway Route' for relation creation"); 76 assertTrue(getMatchingPresetNames("route", tram).contains("Public Transport Route (Rail)"), 77 "railway=tram should match 'Public Transport Route (Rail)' for relation creation"); 78 assertFalse(getMatchingPresetNames("route", tram).toString().contains("Bus"), 79 "railway=tram should not match 'Bus'"); 79 80 } 80 81 } -
trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetReaderTest.java
r16618 r17275 4 4 import static org.CustomMatchers.hasSize; 5 5 import static org.hamcrest.MatcherAssert.assertThat; 6 import static org.junit. Assert.assertEquals;7 import static org.junit. Assert.assertTrue;8 import static org.junit. Assert.fail;6 import static org.junit.jupiter.api.Assertions.assertEquals; 7 import static org.junit.jupiter.api.Assertions.assertTrue; 8 import static org.junit.jupiter.api.Assertions.fail; 9 9 10 10 import java.io.IOException; … … 14 14 15 15 import org.junit.Assert; 16 import org.junit. Rule;17 import org.junit. Test;16 import org.junit.jupiter.api.Test; 17 import org.junit.jupiter.api.extension.RegisterExtension; 18 18 import org.openstreetmap.josm.TestUtils; 19 19 import org.openstreetmap.josm.gui.tagging.presets.items.Check; … … 27 27 * Unit tests of {@link TaggingPresetReader} class. 28 28 */ 29 publicclass TaggingPresetReaderTest {29 class TaggingPresetReaderTest { 30 30 31 31 /** 32 32 * Setup rule 33 33 */ 34 @R ule34 @RegisterExtension 35 35 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 36 36 public JOSMTestRules test = new JOSMTestRules(); … … 42 42 */ 43 43 @Test 44 publicvoid testTicket8954() throws SAXException, IOException {44 void testTicket8954() throws SAXException, IOException { 45 45 String presetfile = TestUtils.getRegressionDataFile(8954, "preset.xml"); 46 46 final Collection<TaggingPreset> presets = TaggingPresetReader.readAll(presetfile, false); … … 58 58 */ 59 59 @Test 60 publicvoid testNestedChunks() throws SAXException, IOException {60 void testNestedChunks() throws SAXException, IOException { 61 61 final Collection<TaggingPreset> presets = TaggingPresetReader.readAll(TestUtils.getTestDataRoot() + "preset_chunk.xml", true); 62 62 assertThat(presets, hasSize(1)); … … 70 70 * Test external entity resolving. 71 71 * See #19286 72 * @throws IOException in case of I/O error 72 73 */ 73 74 @Test 74 publicvoid testExternalEntityResolving() throws IOException {75 void testExternalEntityResolving() throws IOException { 75 76 try { 76 77 TaggingPresetReader.readAll(TestUtils.getTestDataRoot() + "preset_external_entity.xml", true); … … 89 90 */ 90 91 @Test 91 publicvoid testReadDefaulPresets() throws SAXException, IOException {92 void testReadDefaulPresets() throws SAXException, IOException { 92 93 String presetfile = "resource://data/defaultpresets.xml"; 93 94 final Collection<TaggingPreset> presets = TaggingPresetReader.readAll(presetfile, true); -
trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetSelectorTest.java
r13836 r17275 2 2 package org.openstreetmap.josm.gui.tagging.presets; 3 3 4 import static org.junit. Assert.assertEquals;5 import static org.junit. Assert.assertTrue;4 import static org.junit.jupiter.api.Assertions.assertEquals; 5 import static org.junit.jupiter.api.Assertions.assertTrue; 6 6 7 import org.junit. Rule;8 import org.junit. Test;7 import org.junit.jupiter.api.extension.RegisterExtension; 8 import org.junit.jupiter.api.Test; 9 9 import org.openstreetmap.josm.gui.tagging.presets.TaggingPresetSelector.PresetClassification; 10 10 import org.openstreetmap.josm.testutils.JOSMTestRules; … … 15 15 * Unit tests of {@link TaggingPresetSelector} class. 16 16 */ 17 publicclass TaggingPresetSelectorTest {17 class TaggingPresetSelectorTest { 18 18 19 19 /** 20 20 * Setup rule 21 21 */ 22 @R ule22 @RegisterExtension 23 23 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 24 24 public JOSMTestRules test = new JOSMTestRules(); … … 28 28 */ 29 29 @Test 30 publicvoid testIsMatching() {30 void testIsMatching() { 31 31 TaggingPreset preset = new TaggingPreset(); 32 32 preset.name = "estação de bombeiros"; // fire_station in brazilian portuguese -
trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetsTest.java
r16768 r17275 8 8 import java.util.concurrent.TimeoutException; 9 9 10 import org.junit. Rule;11 import org.junit. Test;10 import org.junit.jupiter.api.Test; 11 import org.junit.jupiter.api.extension.RegisterExtension; 12 12 import org.openstreetmap.josm.testutils.JOSMTestRules; 13 13 import org.openstreetmap.josm.tools.Logging; … … 24 24 * Setup rule 25 25 */ 26 @R ule26 @RegisterExtension 27 27 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 28 28 public JOSMTestRules test = new JOSMTestRules(); … … 33 33 */ 34 34 @Test 35 publicvoid testUtilityClass() throws ReflectiveOperationException {35 void testUtilityClass() throws ReflectiveOperationException { 36 36 UtilityClassTestUtil.assertUtilityClassWellDefined(TaggingPresets.class); 37 37 } -
trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/CheckGroupTest.java
r16042 r17275 2 2 package org.openstreetmap.josm.gui.tagging.presets.items; 3 3 4 import static org.junit. Assert.assertEquals;5 import static org.junit. Assert.assertFalse;6 import static org.junit. Assert.assertTrue;4 import static org.junit.jupiter.api.Assertions.assertEquals; 5 import static org.junit.jupiter.api.Assertions.assertFalse; 6 import static org.junit.jupiter.api.Assertions.assertTrue; 7 7 8 8 import java.util.Collections; … … 10 10 import javax.swing.JPanel; 11 11 12 import org.junit. BeforeClass;13 import org.junit. Test;12 import org.junit.jupiter.api.BeforeAll; 13 import org.junit.jupiter.api.Test; 14 14 import org.openstreetmap.josm.JOSMFixture; 15 15 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 18 18 * Unit tests of {@link CheckGroup} class. 19 19 */ 20 publicclass CheckGroupTest {20 class CheckGroupTest { 21 21 22 22 /** 23 23 * Setup test. 24 24 */ 25 @Before Class25 @BeforeAll 26 26 public static void setUp() { 27 27 JOSMFixture.createUnitTestFixture().init(); … … 32 32 */ 33 33 @Test 34 publicvoid testAddToPanel() {34 void testAddToPanel() { 35 35 CheckGroup cg = new CheckGroup(); 36 36 JPanel p = new JPanel(); -
trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/CheckTest.java
r16282 r17275 2 2 package org.openstreetmap.josm.gui.tagging.presets.items; 3 3 4 import static org.junit. Assert.assertEquals;5 import static org.junit. Assert.assertTrue;4 import static org.junit.jupiter.api.Assertions.assertEquals; 5 import static org.junit.jupiter.api.Assertions.assertTrue; 6 6 7 7 import java.util.Collections; … … 9 9 import javax.swing.JPanel; 10 10 11 import org.junit. Rule;12 import org.junit. Test;11 import org.junit.jupiter.api.extension.RegisterExtension; 12 import org.junit.jupiter.api.Test; 13 13 import org.openstreetmap.josm.data.osm.OsmPrimitive; 14 14 import org.openstreetmap.josm.testutils.JOSMTestRules; … … 19 19 * Unit tests of {@link Check} class. 20 20 */ 21 publicclass CheckTest {21 class CheckTest { 22 22 23 23 /** 24 24 * Setup test. 25 25 */ 26 @R ule26 @RegisterExtension 27 27 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 28 28 public JOSMTestRules test = new JOSMTestRules().main(); … … 32 32 */ 33 33 @Test 34 publicvoid testAddToPanel() {34 void testAddToPanel() { 35 35 JPanel p = new JPanel(); 36 36 assertEquals(0, p.getComponentCount()); -
trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/ComboTest.java
r16693 r17275 2 2 package org.openstreetmap.josm.gui.tagging.presets.items; 3 3 4 import static org.junit. Assert.assertEquals;5 import static org.junit. Assert.assertTrue;4 import static org.junit.jupiter.api.Assertions.assertEquals; 5 import static org.junit.jupiter.api.Assertions.assertTrue; 6 6 7 7 import java.awt.Color; … … 11 11 import javax.swing.JPanel; 12 12 13 import org.junit. Rule;14 import org.junit. Test;13 import org.junit.jupiter.api.extension.RegisterExtension; 14 import org.junit.jupiter.api.Test; 15 15 import org.openstreetmap.josm.data.osm.OsmPrimitive; 16 16 import org.openstreetmap.josm.data.osm.OsmUtils; … … 22 22 * Unit tests of {@link Combo} class. 23 23 */ 24 publicclass ComboTest {24 class ComboTest { 25 25 26 26 /** 27 27 * Setup test. 28 28 */ 29 @R ule29 @RegisterExtension 30 30 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 31 31 public JOSMTestRules test = new JOSMTestRules().main().i18n("de"); … … 35 35 */ 36 36 @Test 37 publicvoid testAddToPanel() {37 void testAddToPanel() { 38 38 JPanel p = new JPanel(); 39 39 assertEquals(0, p.getComponentCount()); … … 46 46 */ 47 47 @Test 48 publicvoid testUseLastAsDefault() {48 void testUseLastAsDefault() { 49 49 Combo combo = new Combo(); 50 50 combo.key = "addr:country"; … … 83 83 84 84 @Test 85 publicvoid testColor() {85 void testColor() { 86 86 Combo combo = new Combo(); 87 87 combo.key = "colour"; -
trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/ItemSeparatorTest.java
r9996 r17275 2 2 package org.openstreetmap.josm.gui.tagging.presets.items; 3 3 4 import static org.junit. Assert.assertEquals;5 import static org.junit. Assert.assertFalse;6 import static org.junit. Assert.assertTrue;4 import static org.junit.jupiter.api.Assertions.assertEquals; 5 import static org.junit.jupiter.api.Assertions.assertFalse; 6 import static org.junit.jupiter.api.Assertions.assertTrue; 7 7 8 8 import java.util.Collections; … … 10 10 import javax.swing.JPanel; 11 11 12 import org.junit. BeforeClass;13 import org.junit. Test;12 import org.junit.jupiter.api.BeforeAll; 13 import org.junit.jupiter.api.Test; 14 14 import org.openstreetmap.josm.JOSMFixture; 15 15 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 18 18 * Unit tests of {@link ItemSeparator} class. 19 19 */ 20 publicclass ItemSeparatorTest {20 class ItemSeparatorTest { 21 21 22 22 /** 23 23 * Setup test. 24 24 */ 25 @Before Class25 @BeforeAll 26 26 public static void setUp() { 27 27 JOSMFixture.createUnitTestFixture().init(); … … 32 32 */ 33 33 @Test 34 publicvoid testAddToPanel() {34 void testAddToPanel() { 35 35 JPanel p = new JPanel(); 36 36 assertEquals(0, p.getComponentCount()); -
trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/KeyTest.java
r9996 r17275 2 2 package org.openstreetmap.josm.gui.tagging.presets.items; 3 3 4 import static org.junit. Assert.assertEquals;5 import static org.junit. Assert.assertFalse;4 import static org.junit.jupiter.api.Assertions.assertEquals; 5 import static org.junit.jupiter.api.Assertions.assertFalse; 6 6 7 7 import java.util.Collections; … … 9 9 import javax.swing.JPanel; 10 10 11 import org.junit. BeforeClass;12 import org.junit. Test;11 import org.junit.jupiter.api.BeforeAll; 12 import org.junit.jupiter.api.Test; 13 13 import org.openstreetmap.josm.JOSMFixture; 14 14 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 17 17 * Unit tests of {@link Key} class. 18 18 */ 19 publicclass KeyTest {19 class KeyTest { 20 20 21 21 /** 22 22 * Setup test. 23 23 */ 24 @Before Class24 @BeforeAll 25 25 public static void setUp() { 26 26 JOSMFixture.createUnitTestFixture().init(); … … 31 31 */ 32 32 @Test 33 publicvoid testAddToPanel() {33 void testAddToPanel() { 34 34 JPanel p = new JPanel(); 35 35 assertEquals(0, p.getComponentCount()); -
trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/LabelTest.java
r9996 r17275 2 2 package org.openstreetmap.josm.gui.tagging.presets.items; 3 3 4 import static org.junit. Assert.assertEquals;5 import static org.junit. Assert.assertTrue;4 import static org.junit.jupiter.api.Assertions.assertEquals; 5 import static org.junit.jupiter.api.Assertions.assertTrue; 6 6 7 7 import java.util.Collections; … … 9 9 import javax.swing.JPanel; 10 10 11 import org.junit. BeforeClass;12 import org.junit. Test;11 import org.junit.jupiter.api.BeforeAll; 12 import org.junit.jupiter.api.Test; 13 13 import org.openstreetmap.josm.JOSMFixture; 14 14 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 17 17 * Unit tests of {@link Label} class. 18 18 */ 19 publicclass LabelTest {19 class LabelTest { 20 20 21 21 /** 22 22 * Setup test. 23 23 */ 24 @Before Class24 @BeforeAll 25 25 public static void setUp() { 26 26 JOSMFixture.createUnitTestFixture().init(); … … 31 31 */ 32 32 @Test 33 publicvoid testAddToPanel() {33 void testAddToPanel() { 34 34 JPanel p = new JPanel(); 35 35 assertEquals(0, p.getComponentCount()); -
trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/LinkTest.java
r14119 r17275 2 2 package org.openstreetmap.josm.gui.tagging.presets.items; 3 3 4 import static org.junit. Assert.assertEquals;5 import static org.junit. Assert.assertFalse;6 import static org.junit. Assert.assertTrue;4 import static org.junit.jupiter.api.Assertions.assertEquals; 5 import static org.junit.jupiter.api.Assertions.assertFalse; 6 import static org.junit.jupiter.api.Assertions.assertTrue; 7 7 8 8 import java.util.Collections; … … 10 10 import javax.swing.JPanel; 11 11 12 import org.junit. BeforeClass;13 import org.junit. Test;12 import org.junit.jupiter.api.BeforeAll; 13 import org.junit.jupiter.api.Test; 14 14 import org.openstreetmap.josm.JOSMFixture; 15 15 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 19 19 * Unit tests of {@link Link} class. 20 20 */ 21 publicclass LinkTest {21 class LinkTest { 22 22 23 23 /** 24 24 * Setup test. 25 25 */ 26 @Before Class26 @BeforeAll 27 27 public static void setUp() { 28 28 JOSMFixture.createUnitTestFixture().init(); … … 33 33 */ 34 34 @Test 35 publicvoid testAddToPanel() {35 void testAddToPanel() { 36 36 Link l = new Link(); 37 37 JPanel p = new JPanel(); -
trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/MultiSelectTest.java
r9996 r17275 2 2 package org.openstreetmap.josm.gui.tagging.presets.items; 3 3 4 import static org.junit. Assert.assertEquals;5 import static org.junit. Assert.assertTrue;4 import static org.junit.jupiter.api.Assertions.assertEquals; 5 import static org.junit.jupiter.api.Assertions.assertTrue; 6 6 7 7 import java.util.Collections; … … 9 9 import javax.swing.JPanel; 10 10 11 import org.junit. BeforeClass;12 import org.junit. Test;11 import org.junit.jupiter.api.BeforeAll; 12 import org.junit.jupiter.api.Test; 13 13 import org.openstreetmap.josm.JOSMFixture; 14 14 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 17 17 * Unit tests of {@link MultiSelect} class. 18 18 */ 19 publicclass MultiSelectTest {19 class MultiSelectTest { 20 20 21 21 /** 22 22 * Setup test. 23 23 */ 24 @Before Class24 @BeforeAll 25 25 public static void setUp() { 26 26 JOSMFixture.createUnitTestFixture().init(); … … 31 31 */ 32 32 @Test 33 publicvoid testAddToPanel() {33 void testAddToPanel() { 34 34 JPanel p = new JPanel(); 35 35 assertEquals(0, p.getComponentCount()); -
trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/OptionalTest.java
r9996 r17275 2 2 package org.openstreetmap.josm.gui.tagging.presets.items; 3 3 4 import static org.junit. Assert.assertEquals;5 import static org.junit. Assert.assertFalse;6 import static org.junit. Assert.assertTrue;4 import static org.junit.jupiter.api.Assertions.assertEquals; 5 import static org.junit.jupiter.api.Assertions.assertFalse; 6 import static org.junit.jupiter.api.Assertions.assertTrue; 7 7 8 8 import java.util.Collections; … … 10 10 import javax.swing.JPanel; 11 11 12 import org.junit. BeforeClass;13 import org.junit. Test;12 import org.junit.jupiter.api.BeforeAll; 13 import org.junit.jupiter.api.Test; 14 14 import org.openstreetmap.josm.JOSMFixture; 15 15 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 18 18 * Unit tests of {@link Optional} class. 19 19 */ 20 publicclass OptionalTest {20 class OptionalTest { 21 21 22 22 /** 23 23 * Setup test. 24 24 */ 25 @Before Class25 @BeforeAll 26 26 public static void setUp() { 27 27 JOSMFixture.createUnitTestFixture().init(); … … 32 32 */ 33 33 @Test 34 publicvoid testAddToPanel() {34 void testAddToPanel() { 35 35 JPanel p = new JPanel(); 36 36 assertEquals(0, p.getComponentCount()); -
trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/PresetLinkTest.java
r12568 r17275 2 2 package org.openstreetmap.josm.gui.tagging.presets.items; 3 3 4 import static org.junit. Assert.assertEquals;5 import static org.junit. Assert.assertFalse;6 import static org.junit. Assert.assertTrue;4 import static org.junit.jupiter.api.Assertions.assertEquals; 5 import static org.junit.jupiter.api.Assertions.assertFalse; 6 import static org.junit.jupiter.api.Assertions.assertTrue; 7 7 8 8 import java.util.Collections; … … 10 10 import javax.swing.JPanel; 11 11 12 import org.junit. Rule;13 import org.junit. Test;12 import org.junit.jupiter.api.extension.RegisterExtension; 13 import org.junit.jupiter.api.Test; 14 14 import org.openstreetmap.josm.data.osm.OsmPrimitive; 15 15 import org.openstreetmap.josm.testutils.JOSMTestRules; … … 20 20 * Unit tests of {@link PresetLink} class. 21 21 */ 22 publicclass PresetLinkTest {22 class PresetLinkTest { 23 23 24 24 /** 25 25 * Setup test. 26 26 */ 27 @R ule27 @RegisterExtension 28 28 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 29 29 public JOSMTestRules rule = new JOSMTestRules().presets(); … … 33 33 */ 34 34 @Test 35 publicvoid testAddToPanel() {35 void testAddToPanel() { 36 36 PresetLink l = new PresetLink(); 37 37 l.preset_name = "River"; -
trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/PresetListEntryTest.java
r16690 r17275 2 2 package org.openstreetmap.josm.gui.tagging.presets.items; 3 3 4 import static org.junit. Assert.assertEquals;4 import static org.junit.jupiter.api.Assertions.assertEquals; 5 5 6 import org.junit. BeforeClass;7 import org.junit. Test;6 import org.junit.jupiter.api.BeforeAll; 7 import org.junit.jupiter.api.Test; 8 8 import org.openstreetmap.josm.JOSMFixture; 9 9 … … 11 11 * Unit tests of {@link PresetListEntry} class. 12 12 */ 13 publicclass PresetListEntryTest {13 class PresetListEntryTest { 14 14 15 15 /** 16 16 * Setup test. 17 17 */ 18 @Before Class18 @BeforeAll 19 19 public static void setUp() { 20 20 JOSMFixture.createUnitTestFixture().init(); … … 25 25 */ 26 26 @Test 27 publicvoid testTicket12416() {27 void testTicket12416() { 28 28 assertEquals(" ", new PresetListEntry("").getListDisplay()); 29 29 } -
trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/RolesTest.java
r9996 r17275 2 2 package org.openstreetmap.josm.gui.tagging.presets.items; 3 3 4 import static org.junit. Assert.assertEquals;5 import static org.junit. Assert.assertFalse;6 import static org.junit. Assert.assertTrue;4 import static org.junit.jupiter.api.Assertions.assertEquals; 5 import static org.junit.jupiter.api.Assertions.assertFalse; 6 import static org.junit.jupiter.api.Assertions.assertTrue; 7 7 8 8 import java.util.Collections; … … 10 10 import javax.swing.JPanel; 11 11 12 import org.junit. BeforeClass;13 import org.junit. Test;12 import org.junit.jupiter.api.BeforeAll; 13 import org.junit.jupiter.api.Test; 14 14 import org.openstreetmap.josm.JOSMFixture; 15 15 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 18 18 * Unit tests of {@link Roles} class. 19 19 */ 20 publicclass RolesTest {20 class RolesTest { 21 21 22 22 /** 23 23 * Setup test. 24 24 */ 25 @Before Class25 @BeforeAll 26 26 public static void setUp() { 27 27 JOSMFixture.createUnitTestFixture().init(); … … 32 32 */ 33 33 @Test 34 publicvoid testAddToPanel() {34 void testAddToPanel() { 35 35 JPanel p = new JPanel(); 36 36 assertEquals(0, p.getComponentCount()); -
trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/SpaceTest.java
r9996 r17275 2 2 package org.openstreetmap.josm.gui.tagging.presets.items; 3 3 4 import static org.junit. Assert.assertEquals;5 import static org.junit. Assert.assertFalse;6 import static org.junit. Assert.assertTrue;4 import static org.junit.jupiter.api.Assertions.assertEquals; 5 import static org.junit.jupiter.api.Assertions.assertFalse; 6 import static org.junit.jupiter.api.Assertions.assertTrue; 7 7 8 8 import java.util.Collections; … … 10 10 import javax.swing.JPanel; 11 11 12 import org.junit. BeforeClass;13 import org.junit. Test;12 import org.junit.jupiter.api.BeforeAll; 13 import org.junit.jupiter.api.Test; 14 14 import org.openstreetmap.josm.JOSMFixture; 15 15 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 18 18 * Unit tests of {@link Space} class. 19 19 */ 20 publicclass SpaceTest {20 class SpaceTest { 21 21 22 22 /** 23 23 * Setup test. 24 24 */ 25 @Before Class25 @BeforeAll 26 26 public static void setUp() { 27 27 JOSMFixture.createUnitTestFixture().init(); … … 32 32 */ 33 33 @Test 34 publicvoid testAddToPanel() {34 void testAddToPanel() { 35 35 JPanel p = new JPanel(); 36 36 assertEquals(0, p.getComponentCount()); -
trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/TextTest.java
r16282 r17275 2 2 package org.openstreetmap.josm.gui.tagging.presets.items; 3 3 4 import static org.junit. Assert.assertEquals;5 import static org.junit. Assert.assertTrue;4 import static org.junit.jupiter.api.Assertions.assertEquals; 5 import static org.junit.jupiter.api.Assertions.assertTrue; 6 6 7 7 import java.util.Collections; … … 9 9 import javax.swing.JPanel; 10 10 11 import org.junit. Rule;12 import org.junit. Test;11 import org.junit.jupiter.api.extension.RegisterExtension; 12 import org.junit.jupiter.api.Test; 13 13 import org.openstreetmap.josm.data.osm.OsmPrimitive; 14 14 import org.openstreetmap.josm.testutils.JOSMTestRules; … … 19 19 * Unit tests of {@link Text} class. 20 20 */ 21 publicclass TextTest {21 class TextTest { 22 22 23 23 /** 24 24 * Setup test. 25 25 */ 26 @R ule26 @RegisterExtension 27 27 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 28 28 public JOSMTestRules test = new JOSMTestRules().main(); … … 32 32 */ 33 33 @Test 34 publicvoid testAddToPanel() {34 void testAddToPanel() { 35 35 JPanel p = new JPanel(); 36 36 assertEquals(0, p.getComponentCount());
Note:
See TracChangeset
for help on using the changeset viewer.