Changeset 9023 in josm for trunk/test/unit/org/openstreetmap
- Timestamp:
- 2015-11-19T00:33:55+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/validation/tests/TagCheckerTest.java
r8863 r9023 3 3 4 4 import static org.junit.Assert.assertEquals; 5 import static org.junit.Assert.assertTrue; 5 6 6 7 import java.io.IOException; 8 import java.util.ArrayList; 7 9 import java.util.List; 8 10 … … 12 14 import org.openstreetmap.josm.data.osm.OsmPrimitive; 13 15 import org.openstreetmap.josm.data.osm.OsmUtils; 16 import org.openstreetmap.josm.data.osm.Tag; 14 17 import org.openstreetmap.josm.data.validation.TestError; 15 18 import org.openstreetmap.josm.gui.tagging.presets.TaggingPresets; … … 68 71 assertEquals("Value 'forrest' for key 'landuse' not in presets.", errors.get(0).getDescription()); 69 72 } 73 74 /** 75 * Checks that tags specifically ignored are effectively not in internal presets. 76 * @throws IOException if any I/O error occurs 77 */ 78 @Test 79 public void testIgnoredTagsNotInPresets() throws IOException { 80 List<String> errors = new ArrayList<>(); 81 new TagChecker().initialize(); 82 for (Tag tag : TagChecker.getIgnoredTags()) { 83 if (TagChecker.isTagInPresets(tag.getKey(), tag.getValue())) { 84 errors.add(tag.toString()); 85 } 86 } 87 assertTrue(errors.toString(), errors.isEmpty()); 88 } 70 89 }
Note:
See TracChangeset
for help on using the changeset viewer.