Changeset 9382 in josm for trunk/test/unit/org
- Timestamp:
- 2016-01-10T10:49:51+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/validation/tests/TagCheckerTest.java
r9231 r9382 45 45 */ 46 46 @Test 47 public void test InvalidKey() throws IOException {47 public void testMisspelledKey1() throws IOException { 48 48 final List<TestError> errors = test(OsmUtils.createPrimitive("node Name=Main")); 49 49 assertEquals(1, errors.size()); 50 50 assertEquals("Misspelled property key", errors.get(0).getMessage()); 51 51 assertEquals("Key 'Name' looks like 'name'.", errors.get(0).getDescription()); 52 assertEquals(true, errors.get(0).isFixable()); 52 53 } 53 54 … … 57 58 */ 58 59 @Test 59 public void testMisspelledKey () throws IOException {60 public void testMisspelledKey2() throws IOException { 60 61 final List<TestError> errors = test(OsmUtils.createPrimitive("node landuse;=forest")); 61 62 assertEquals(1, errors.size()); 62 63 assertEquals("Misspelled property key", errors.get(0).getMessage()); 63 64 assertEquals("Key 'landuse;' looks like 'landuse'.", errors.get(0).getDescription()); 65 assertEquals(true, errors.get(0).isFixable()); 66 } 67 68 /** 69 * Check for mispelled key where the suggested alternative is in use. The error should not be fixable. 70 * @throws IOException if any I/O error occurs 71 */ 72 @Test 73 public void testMisspelledKeyButAlternativeInUse() throws IOException { 74 // ticket 12329 75 final List<TestError> errors = test(OsmUtils.createPrimitive("node amenity=fuel brand=bah Brand=foo")); 76 assertEquals(1, errors.size()); 77 assertEquals("Misspelled property key", errors.get(0).getMessage()); 78 assertEquals("Key 'Brand' looks like 'brand'.", errors.get(0).getDescription()); 79 assertEquals(false, errors.get(0).isFixable()); 64 80 } 65 81
Note:
See TracChangeset
for help on using the changeset viewer.