Changeset 16616 in josm for trunk/test
- Timestamp:
- 2020-06-14T11:24:35+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/validation/tests/RelationCheckerTest.java
r15455 r16616 10 10 import org.junit.Rule; 11 11 import org.junit.Test; 12 import org.openstreetmap.josm.data.osm.Node; 13 import org.openstreetmap.josm.data.osm.OsmUtils; 12 14 import org.openstreetmap.josm.data.osm.Relation; 13 15 import org.openstreetmap.josm.data.osm.RelationMember; … … 78 80 List<TestError> errors = testRelation(r); 79 81 assertEquals(1, errors.size()); 80 assertEquals("Role 'outer2' is not in templates 'outer/inner'", errors.get(0).getDescription());82 assertEquals("Role 'outer2' is not among expected values 'outer/inner'", errors.get(0).getDescription()); 81 83 } 82 84 … … 154 156 List<TestError> errors = testRelation(r); 155 157 assertEquals(1, errors.size()); 156 assertEquals("Role 'level_x' is not in templates 'outline/part/ridge/edge/entrance/level_-?\\d+'", errors.get(0).getDescription()); 158 assertEquals("Role 'level_x' is not among expected values 'outline/part/ridge/edge/entrance/level_-?\\d+'", 159 errors.get(0).getDescription()); 160 } 161 162 @Test 163 public void testHikingRouteMembers() { 164 Relation r = createRelation("type=route route=hiking"); 165 r.addMember(new RelationMember("", OsmUtils.createPrimitive("way highway=path"))); 166 r.addMember(new RelationMember("route", OsmUtils.createPrimitive("way highway=path"))); // fails 167 r.addMember(new RelationMember("guidepost", new Node())); // fails 168 169 List<TestError> errors = testRelation(r); 170 assertEquals(2, errors.size()); 171 assertEquals("Role of relation member does not match template expression 'information=guidepost' in preset Hiking Route", 172 errors.get(0).getDescription()); 173 assertEquals("Role 'route' is not among expected values '<empty>/guidepost'", errors.get(1).getDescription()); 157 174 } 158 175
Note:
See TracChangeset
for help on using the changeset viewer.