Changeset 14696 in josm for trunk/test/unit/org/openstreetmap
- Timestamp:
- 2019-01-13T17:24:13+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/validation/tests/TagCheckerTest.java
r14585 r14696 105 105 final List<TestError> errors = test(OsmUtils.createPrimitive("node landuse=forrest")); 106 106 assertEquals(1, errors.size()); 107 assertEquals(" Misspelledproperty value", errors.get(0).getMessage());108 assertEquals("Value 'forrest' for key 'landuse' looks like 'forest'.", errors.get(0).getDescription());107 assertEquals("Unknown property value", errors.get(0).getMessage()); 108 assertEquals("Value 'forrest' for key 'landuse' is unknown, maybe 'forest' is meant?", errors.get(0).getDescription()); 109 109 assertEquals(Severity.WARNING, errors.get(0).getSeverity()); 110 110 assertFalse(errors.get(0).isFixable()); … … 119 119 final List<TestError> errors = test(OsmUtils.createPrimitive("node highway=servics")); 120 120 assertEquals(1, errors.size()); 121 assertEquals("Misspelled property value", errors.get(0).getMessage()); 122 assertEquals("Value 'servics' for key 'highway' looks like one of [service, services].", errors.get(0).getDescription()); 121 assertEquals("Unknown property value", errors.get(0).getMessage()); 122 assertEquals( 123 "Value 'servics' for key 'highway' is unknown, maybe one of [service, services] is meant?", 124 errors.get(0).getDescription()); 123 125 assertEquals(Severity.WARNING, errors.get(0).getSeverity()); 124 126 assertFalse(errors.get(0).isFixable()); … … 133 135 final List<TestError> errors = test(OsmUtils.createPrimitive("node highway=residentail")); 134 136 assertEquals(1, errors.size()); 135 assertEquals("Misspelled property value", errors.get(0).getMessage()); 136 assertEquals("Value 'residentail' for key 'highway' looks like 'residential'.", errors.get(0).getDescription()); 137 assertEquals(Severity.WARNING, errors.get(0).getSeverity()); 138 assertFalse(errors.get(0).isFixable()); 139 } 140 141 /** 142 * Check for misspelled value. 143 * @throws IOException if any I/O error occurs 144 */ 145 @Test 146 public void testShortValNotInPreset() throws IOException { 147 final List<TestError> errors = test(OsmUtils.createPrimitive("node layer=6")); 148 assertEquals(1, errors.size()); 149 assertEquals("Presets do not contain property value", errors.get(0).getMessage()); 150 assertEquals("Value '6' for key 'layer' not in presets.", errors.get(0).getDescription()); 151 assertEquals(Severity.OTHER, errors.get(0).getSeverity()); 137 assertEquals("Unknown property value", errors.get(0).getMessage()); 138 assertEquals("Value 'residentail' for key 'highway' is unknown, maybe 'residential' is meant?", 139 errors.get(0).getDescription()); 140 assertEquals(Severity.WARNING, errors.get(0).getSeverity()); 152 141 assertFalse(errors.get(0).isFixable()); 153 142 } … … 205 194 final List<TestError> errors = test(OsmUtils.createPrimitive("node highway=Residential")); 206 195 assertEquals(1, errors.size()); 207 assertEquals("Misspelled property value", errors.get(0).getMessage()); 208 assertEquals("Value 'Residential' for key 'highway' looks like 'residential'.", errors.get(0).getDescription()); 196 assertEquals("Unknown property value", errors.get(0).getMessage()); 197 assertEquals("Value 'Residential' for key 'highway' is unknown, maybe 'residential' is meant?", 198 errors.get(0).getDescription()); 209 199 assertEquals(Severity.WARNING, errors.get(0).getSeverity()); 210 200 assertFalse(errors.get(0).isFixable());
Note:
See TracChangeset
for help on using the changeset viewer.