Changeset 15603 in josm for trunk/test/unit/org
- Timestamp:
- 2019-12-21T03:15:48+01:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/validation/OsmValidatorTest.java
r15460 r15603 3 3 4 4 import static org.junit.Assert.assertFalse; 5 import static org.junit.Assert.assertNotEquals; 5 6 import static org.junit.Assert.assertTrue; 6 7 … … 8 9 import org.junit.Rule; 9 10 import org.junit.Test; 11 import org.openstreetmap.josm.data.validation.tests.Addresses; 10 12 import org.openstreetmap.josm.testutils.JOSMTestRules; 11 13 … … 84 86 } 85 87 88 /** 89 * Test that tests are really removed, and that core tests cannot be removed 90 */ 91 @Test 92 public void testRemoveTests() { 93 org.openstreetmap.josm.data.validation.Test test = new org.openstreetmap.josm.data.validation.Test("test") { 94 }; 95 assertNotEquals(org.openstreetmap.josm.data.validation.Test.class, test.getClass()); 96 OsmValidator.addTest(test.getClass()); 97 assertTrue(OsmValidator.getAllAvailableTestClasses().contains(test.getClass())); 98 assertTrue(OsmValidator.removeTest(test.getClass())); 99 assertFalse(OsmValidator.removeTest(test.getClass())); 100 assertFalse(OsmValidator.getAllAvailableTestClasses().contains(test.getClass())); 101 102 assertTrue(OsmValidator.getAllAvailableTestClasses().contains(Addresses.class)); 103 assertFalse(OsmValidator.removeTest(Addresses.class)); 104 assertTrue(OsmValidator.getAllAvailableTestClasses().contains(Addresses.class)); 105 } 106 86 107 }
Note:
See TracChangeset
for help on using the changeset viewer.