Changeset 19175 in josm for trunk/test/unit
- Timestamp:
- 2024-08-08T16:48:41+02:00 (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/osm/DataSetMergerTest.java
r18853 r19175 14 14 import java.time.Instant; 15 15 import java.util.Arrays; 16 import java.util.function.BiConsumer; 17 import java.util.stream.Stream; 16 18 17 19 import org.junit.jupiter.api.AfterEach; 18 20 import org.junit.jupiter.api.BeforeEach; 19 21 import org.junit.jupiter.api.Test; 22 import org.junit.jupiter.params.ParameterizedTest; 23 import org.junit.jupiter.params.provider.MethodSource; 20 24 import org.openstreetmap.josm.data.coor.LatLon; 21 25 import org.openstreetmap.josm.data.projection.ProjectionRegistry; … … 1357 1361 } 1358 1362 1363 static Stream<BiConsumer<Node, Node>> testNonRegression23846() { 1364 return Stream.of( 1365 (firstNode, secondNode) -> firstNode.setModified(true), 1366 (firstNode, secondNode) -> { /* No modifications */ } 1367 ); 1368 } 1369 1370 @ParameterizedTest 1371 @MethodSource 1372 void testNonRegression23846(BiConsumer<Node, Node> nodeSetup) { 1373 final Node firstNode = new Node(1234, 1); 1374 final Node secondNode = new Node(1234, 1); 1375 final DataSetMerger merge = new DataSetMerger(my, their); 1376 firstNode.setCoor(LatLon.ZERO); 1377 secondNode.setCoor(LatLon.ZERO); 1378 nodeSetup.accept(firstNode, secondNode); 1379 my.addPrimitive(firstNode); 1380 their.addPrimitive(secondNode); 1381 secondNode.setReferrersDownloaded(true); 1382 assertFalse(firstNode.isReferrersDownloaded()); 1383 assertTrue(secondNode.isReferrersDownloaded()); 1384 merge.merge(); 1385 assertTrue(firstNode.isReferrersDownloaded()); 1386 assertTrue(secondNode.isReferrersDownloaded()); 1387 } 1359 1388 }
Note:
See TracChangeset
for help on using the changeset viewer.