Changeset 6677 in josm for trunk/test/unit/org/openstreetmap
- Timestamp:
- 2014-01-12T23:04:43+01:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/validation/tests/MapCSSTagCheckerTest.java
r6636 r6677 38 38 final List<MapCSSTagChecker.TagCheck> checks = MapCSSTagChecker.TagCheck.readMapCSS(new StringReader("" + 39 39 "*[natural=marsh] {\n" + 40 " throwWarning: tr(\"{0} is deprecated\", \"{0.tag}\");\n" +40 " throwWarning: tr(\"{0}={1} is deprecated\", \"{0.key}\", tag(\"natural\"));\n" + 41 41 " fixRemove: \"{0.key}\";\n" + 42 42 " fixAdd: \"natural=wetland\";\n" + … … 46 46 final MapCSSTagChecker.TagCheck check = checks.get(0); 47 47 assertThat(check, notNullValue()); 48 assertThat(check.getDescription( ), is("{0.tag}is deprecated"));48 assertThat(check.getDescription(null), is("{0.key}=null is deprecated")); 49 49 assertThat(check.change.get(0).apply(null), is(new Tag("{0.key}"))); 50 50 assertThat(check.change.get(1).apply(null), is(new Tag("natural", "wetland"))); … … 83 83 if (isError != i.getValue()) { 84 84 final String error = MessageFormat.format("Expecting test ''{0}'' (i.e., {1}) to {2} {3} (i.e., {4})", 85 check.getMessage( ), check.rule.selectors, i.getValue() ? "match" : "not match", i.getKey(), p.getKeys());85 check.getMessage(p), check.rule.selectors, i.getValue() ? "match" : "not match", i.getKey(), p.getKeys()); 86 86 System.err.println(error); 87 87 assertionErrors.add(error);
Note:
See TracChangeset
for help on using the changeset viewer.