Changeset 11109 in josm for trunk/test/unit/org/openstreetmap
- Timestamp:
- 2016-10-09T04:03:32+02:00 (8 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm/actions
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/actions/MergeNodesActionTest.java
r11108 r11109 3 3 4 4 import static org.junit.Assert.assertEquals; 5 import static org.junit.Assert.assertNull; 5 6 6 7 import java.util.Arrays; … … 46 47 47 48 /** 48 * Unit test of {@link MergeNodesAction#selectTargetLocationNode} - mode 049 * Unit test of {@link MergeNodesAction#selectTargetLocationNode} 49 50 */ 50 51 @Test 51 public void testSelectTargetLocationNode Mode0() {52 public void testSelectTargetLocationNode() { 52 53 Main.pref.putInteger("merge-nodes.mode", 0); 53 54 assertEquals(1, MergeNodesAction.selectTargetLocationNode(Arrays.asList(new Node(0), new Node(1))).getId()); 54 }55 55 56 /**57 * Unit test of {@link MergeNodesAction#selectTargetLocationNode} - mode 158 */59 @Test60 public void testSelectTargetLocationNodeMode1() {61 56 Main.pref.putInteger("merge-nodes.mode", 1); 62 57 assertEquals(LatLon.ZERO, MergeNodesAction.selectTargetLocationNode( 63 58 Arrays.asList(new Node(LatLon.NORTH_POLE), new Node(LatLon.SOUTH_POLE))).getCoor()); 64 }65 59 66 /**67 * Unit test of {@link MergeNodesAction#selectTargetLocationNode} - mode 2 with a single node68 */69 @Test70 public void testSelectTargetLocationNodeMode2SingleNode() {71 60 Main.pref.putInteger("merge-nodes.mode", 2); 72 61 assertEquals(LatLon.NORTH_POLE, MergeNodesAction.selectTargetLocationNode( 73 62 Arrays.asList(new Node(LatLon.NORTH_POLE))).getCoor()); 74 63 } 64 65 /** 66 * Unit test of {@link MergeNodesAction#selectTargetNode} 67 */ 68 @Test 69 public void testSelectTargetNode() { 70 assertNull(MergeNodesAction.selectTargetNode(Collections.emptyList())); 71 assertEquals(1, MergeNodesAction.selectTargetNode(Arrays.asList(new Node(1))).getId()); 72 } 75 73 }
Note:
See TracChangeset
for help on using the changeset viewer.