Changeset 18840 in josm for trunk/test/unit/org/openstreetmap
- Timestamp:
- 2023-09-21T20:29:59+02:00 (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/validation/tests/PowerLinesTest.java
r18675 r18840 5 5 import static org.junit.jupiter.api.Assertions.assertFalse; 6 6 import static org.junit.jupiter.api.Assertions.assertTrue; 7 8 import java.util.ArrayList; 7 9 8 10 import org.junit.jupiter.api.BeforeEach; … … 16 18 import org.openstreetmap.josm.data.osm.TagMap; 17 19 import org.openstreetmap.josm.data.osm.Way; 20 import org.openstreetmap.josm.gui.progress.NullProgressMonitor; 18 21 import org.openstreetmap.josm.testutils.annotations.BasicPreferences; 19 22 import org.openstreetmap.josm.testutils.annotations.Projection; … … 130 133 assertDoesNotThrow(() -> this.powerLines.visit(powerLine)); 131 134 } 135 136 @Test 137 void testPowerlineCrossingOcean() { 138 final Way powerLine = TestUtils.newWay("power=line", 139 new Node(new LatLon(52.6759313, 8.3845078)), 140 new Node(new LatLon(52.6759857, 8.3898977)), 141 new Node(new LatLon(52.6759857, 8.3949282)), 142 new Node(new LatLon(52.6758768, 8.3978927)), 143 new Node(new LatLon(52.6759313, 8.4322981)), 144 new Node(new LatLon(52.6759857, 8.4419999)), 145 new Node(new LatLon(52.6758768, 8.4488271))); 146 final Way coastline = TestUtils.newWay("natural=coastline", 147 new Node(new LatLon(52.6813231, 8.4253811)), 148 new Node(new LatLon(52.6684687, 8.4254709)), 149 new Node(new LatLon(52.6680328, 8.4033724)), 150 new Node(new LatLon(52.6838282, 8.4070555))); 151 for (Node node : powerLine.getNodes()) { 152 node.put("power", "tower"); 153 } 154 this.ds.addPrimitiveRecursive(powerLine); 155 this.ds.addPrimitiveRecursive(coastline); 156 157 this.powerLines.startTest(NullProgressMonitor.INSTANCE); 158 this.powerLines.visit(new ArrayList<>(ds.getWays())); 159 this.powerLines.endTest(); 160 assertTrue(this.powerLines.getErrors().isEmpty()); 161 } 132 162 }
Note:
See TracChangeset
for help on using the changeset viewer.