Changeset 14517 in josm for trunk/test/unit/org/openstreetmap
- Timestamp:
- 2018-12-06T10:55:42+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/validation/tests/TagCheckerTest.java
r14508 r14517 138 138 assertTrue(errors.get(0).isFixable()); 139 139 } 140 140 141 /** 141 142 * Check for misspelled value. … … 167 168 assertTrue(errors.toString(), errors.isEmpty()); 168 169 } 170 171 /** 172 * Check regression: Don't fix surface=u -> surface=mud. 173 * @throws IOException if any I/O error occurs 174 */ 175 @Test 176 public void testTooShortToFix() throws IOException { 177 final List<TestError> errors = test(OsmUtils.createPrimitive("node surface=u")); 178 assertEquals(1, errors.size()); 179 assertEquals("Presets do not contain property value", errors.get(0).getMessage()); 180 assertEquals("Value 'u' for key 'surface' not in presets.", errors.get(0).getDescription()); 181 assertEquals(Severity.OTHER, errors.get(0).getSeverity()); 182 assertFalse(errors.get(0).isFixable()); 183 } 184 185 /** 186 * Check value with upper case 187 * @throws IOException if any I/O error occurs 188 */ 189 @Test 190 public void testValueDifferentCase() throws IOException { 191 final List<TestError> errors = test(OsmUtils.createPrimitive("node highway=Residential")); 192 assertEquals(1, errors.size()); 193 assertEquals("Misspelled property value", errors.get(0).getMessage()); 194 assertEquals("Value 'Residential' for key 'highway' looks like 'residential'.", errors.get(0).getDescription()); 195 assertEquals(Severity.WARNING, errors.get(0).getSeverity()); 196 assertTrue(errors.get(0).isFixable()); 197 } 198 169 199 }
Note:
See TracChangeset
for help on using the changeset viewer.