Changeset 18374 in josm


Ignore:
Timestamp:
2022-02-09T20:36:14+01:00 (2 years ago)
Author:
taylor.smock
Message:

RelationCheckerTest: Update tests for r18369

see #21738: update building relation preset, where non-closedways were removed
from the preset.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/validation/tests/RelationCheckerTest.java

    r18107 r18374  
    1010import org.junit.jupiter.api.Test;
    1111import org.junit.jupiter.api.extension.RegisterExtension;
     12import org.openstreetmap.josm.TestUtils;
    1213import org.openstreetmap.josm.data.osm.Node;
    1314import org.openstreetmap.josm.data.osm.OsmUtils;
     
    146147    @Test
    147148    void testBuildingMemberExpression() {
    148         Relation r = createRelation("type=building");
    149         r.addMember(new RelationMember("outline", new Way()));
    150         r.addMember(new RelationMember("part", new Way()));
     149        final Relation r = createRelation("type=building");
     150        final Way outline = TestUtils.newWay("", new Node(0, 0), new Node(0, 1), new Node(1, 1),
     151                new Node(1, 0));
     152        outline.addNode(outline.firstNode());
     153        final Way part = TestUtils.newWay("", outline.firstNode(), outline.getNode(1), outline.getNode(2),
     154                outline.lastNode());
     155        r.addMember(new RelationMember("outline", outline));
     156        r.addMember(new RelationMember("part", part));
    151157        r.addMember(new RelationMember("level_-12", new Relation())); // fails (old tagging schema, #21048)
    152158
Note: See TracChangeset for help on using the changeset viewer.