Changeset 2620 in josm for trunk/test
- Timestamp:
- 2009-12-12T17:10:01+01:00 (15 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/osm/APIDataSetTest.java
r2578 r2620 74 74 r3.put("name", "r3"); 75 75 76 Relation r4 = new Relation(1 );76 Relation r4 = new Relation(1, 1); 77 77 r4.put("name", "r4"); 78 r4.setIncomplete(false);79 78 r4.setModified(true); 80 79 -
trunk/test/unit/org/openstreetmap/josm/data/osm/DataSetMergerTest.java
r2587 r2620 191 191 DataSet my = new DataSet(); 192 192 my.setVersion("0.6"); 193 Node n = new Node(1 );193 Node n = new Node(1, 1); 194 194 n.setCoor(new LatLon(0,0)); 195 n.setIncomplete(false);196 195 n.setDeleted(true); 197 196 n.put("key1", "value1"); … … 201 200 their.setVersion("0.6"); 202 201 Node n1 = new Node(new LatLon(0,0)); 203 n1.setOsmId(1, 1);202 n1.setOsmId(1,2); 204 203 n1.setModified(false); 205 204 n1.put("key1", "value1-new"); … … 437 436 DataSet my = new DataSet(); 438 437 my.setVersion("0.6"); 439 Node n = new Node(); 440 n.setCoor(new LatLon(0,0)); 441 n.setOsmId(1,1); 442 n.setIncomplete(true); 438 Node n = new Node(1); 443 439 my.addPrimitive(n); 444 440 … … 1057 1053 my.addPrimitive(n5); 1058 1054 1059 Way w6 = new Way(3); 1060 w6.setIncomplete(false); 1055 Way w6 = new Way(3, 1); 1061 1056 w6.setNodes(Arrays.asList(n4,n5)); 1062 1057 my.addPrimitive(w6); … … 1097 1092 1098 1093 // an complete node 1099 Node n1 = new Node(1 );1094 Node n1 = new Node(1, 1); 1100 1095 n1.setCoor(new LatLon(1,1)); 1101 n1.setIncomplete(false);1102 1096 source.addPrimitive(n1); 1103 1097 1104 1098 // another complete node 1105 Node n2 = new Node(2 );1099 Node n2 = new Node(2, 1); 1106 1100 n2.setCoor(new LatLon(2,2)); 1107 n2.setIncomplete(false);1108 1101 source.addPrimitive(n2); 1109 1102 1110 // --- target da set1103 // --- target dataset 1111 1104 DataSet target = new DataSet(); 1112 1105 target.setVersion("0.6"); … … 1118 1111 target.addPrimitive(n5); 1119 1112 1120 Way w6 = new Way(3); 1121 w6.setIncomplete(false); 1113 Way w6 = new Way(3, 1); 1122 1114 w6.addNode(n4); 1123 1115 w6.addNode(n5); 1124 w6.setIncomplete(true);1125 1116 target.addPrimitive(w6); 1126 1117 … … 1143 1134 assertNotNull(w); 1144 1135 assertFalse(w.hasIncompleteNodes()); 1145 assert False(w.isUsable());1136 assertTrue(w.isUsable()); 1146 1137 assertEquals(2, w.getNodesCount()); 1147 1138 assertEquals(1, w.getNode(0).getId()); -
trunk/test/unit/org/openstreetmap/josm/data/osm/visitor/MergeSourceBuildingVisitorTest.java
r2578 r2620 71 71 Node n1 = new Node(1); 72 72 Node n2 = new Node(2); 73 Way w1 = new Way(3); 74 w1.setIncomplete(false); 73 Way w1 = new Way(3, 1); 75 74 w1.addNode(n1); 76 75 w1.addNode(n2); … … 104 103 Node n1 = new Node(1); 105 104 Node n2 = new Node(2); 106 Way w1 = new Way(3); 107 w1.setIncomplete(false); 105 Way w1 = new Way(3, 1); 108 106 w1.addNode(n1); 109 107 w1.addNode(n2); … … 154 152 DataSet source = new DataSet(); 155 153 Relation r1 = new Relation(1); 156 Node n20 = new Node(20 );154 Node n20 = new Node(20, 1); 157 155 r1.addMember(new RelationMember("node-20",n20)); 158 r1.setIncomplete(false); 159 Way w30 = new Way(30); 160 w30.setIncomplete(false); 156 Way w30 = new Way(30, 1); 161 157 Node n21; 162 158 w30.addNode(n21 = new Node(21)); … … 216 212 Node n20 = new Node(20); 217 213 r1.addMember(new RelationMember("node-20",n20)); 218 Way w30 = new Way(30); 219 w30.setIncomplete(false); 214 Way w30 = new Way(30, 1); 220 215 Node n21; 221 216 w30.addNode(n21 = new Node(21)); -
trunk/test/unit/org/openstreetmap/josm/gui/conflict/nodes/NodeListMergeModelTest.java
r2578 r2620 29 29 } 30 30 31 protected DefaultListSelectionModel inspectListSelectionModel(NodeListMergeModel model, String name) throws NoSuchFieldException, IllegalAccessException{31 protected DefaultListSelectionModel inspectListSelectionModel(NodeListMergeModel model, String name) { 32 32 return field(name).ofType(DefaultListSelectionModel.class) 33 33 .in(model) … … 61 61 62 62 @Test 63 public void test_copyMyNodesToTop_1() throws IllegalAccessException, NoSuchFieldException { 64 NodeListMergeModel model = new NodeListMergeModel(); 65 66 Way myWay = new Way(1); 67 myWay.setIncomplete(false); 63 public void test_copyMyNodesToTop_1() { 64 NodeListMergeModel model = new NodeListMergeModel(); 65 66 Way myWay = new Way(1, 1); 68 67 myWay.addNode(new Node(2)); 69 68 myWay.addNode(new Node(3)); … … 85 84 86 85 @Test 87 public void test_copyMyNodesToTop_2() throws IllegalAccessException, NoSuchFieldException { 88 NodeListMergeModel model = new NodeListMergeModel(); 89 90 91 Way myWay = new Way(1); 92 myWay.setIncomplete(false); 86 public void test_copyMyNodesToTop_2() { 87 NodeListMergeModel model = new NodeListMergeModel(); 88 89 90 Way myWay = new Way(1, 1); 93 91 myWay.addNode(new Node(2)); 94 92 myWay.addNode(new Node(3)); … … 117 115 118 116 @Test 119 public void test_copyMyNodesToTop_3() throws IllegalAccessException, NoSuchFieldException { 120 NodeListMergeModel model = new NodeListMergeModel(); 121 122 123 Way myWay = new Way(1); 124 myWay.setIncomplete(false); 117 public void test_copyMyNodesToTop_3() { 118 NodeListMergeModel model = new NodeListMergeModel(); 119 120 121 Way myWay = new Way(1, 1); 125 122 myWay.addNode(new Node(2)); 126 123 myWay.addNode(new Node(3)); … … 145 142 146 143 @Test 147 public void test_copyMyNodesToTop_4() throws IllegalAccessException, NoSuchFieldException { 148 NodeListMergeModel model = new NodeListMergeModel(); 149 150 151 Way myWay = new Way(1); 152 myWay.setIncomplete(false); 144 public void test_copyMyNodesToTop_4() { 145 NodeListMergeModel model = new NodeListMergeModel(); 146 147 148 Way myWay = new Way(1, 1); 153 149 myWay.addNode(new Node(2)); 154 150 myWay.addNode(new Node(3)); … … 175 171 176 172 @Test 177 public void test_copyMyNodesToEnd_1() throws IllegalAccessException, NoSuchFieldException { 178 NodeListMergeModel model = new NodeListMergeModel(); 179 180 Way myWay = new Way(1); 181 myWay.setIncomplete(false); 173 public void test_copyMyNodesToEnd_1() { 174 NodeListMergeModel model = new NodeListMergeModel(); 175 176 Way myWay = new Way(1, 1); 182 177 myWay.addNode(new Node(2)); 183 178 myWay.addNode(new Node(3)); … … 197 192 198 193 @Test 199 public void test_copyMyNodesToEnd_2() throws IllegalAccessException, NoSuchFieldException { 200 NodeListMergeModel model = new NodeListMergeModel(); 201 202 Way myWay = new Way(1); 203 myWay.setIncomplete(false); 194 public void test_copyMyNodesToEnd_2() { 195 NodeListMergeModel model = new NodeListMergeModel(); 196 197 Way myWay = new Way(1, 1); 204 198 myWay.addNode(new Node(2)); 205 199 myWay.addNode(new Node(3)); … … 223 217 224 218 @Test 225 public void test_copyMyNodesToEnd_3() throws IllegalAccessException, NoSuchFieldException { 226 NodeListMergeModel model = new NodeListMergeModel(); 227 228 229 Way myWay = new Way(1); 230 myWay.setIncomplete(false); 219 public void test_copyMyNodesToEnd_3() { 220 NodeListMergeModel model = new NodeListMergeModel(); 221 222 223 Way myWay = new Way(1, 1); 231 224 myWay.addNode(new Node(2)); 232 225 myWay.addNode(new Node(3)); … … 251 244 252 245 @Test 253 public void test_copyMyNodesToEnd_4() throws IllegalAccessException, NoSuchFieldException { 254 NodeListMergeModel model = new NodeListMergeModel(); 255 256 257 Way myWay = new Way(1); 258 myWay.setIncomplete(false); 246 public void test_copyMyNodesToEnd_4() { 247 NodeListMergeModel model = new NodeListMergeModel(); 248 249 250 Way myWay = new Way(1, 1); 259 251 myWay.addNode(new Node(2)); 260 252 myWay.addNode(new Node(3)); … … 285 277 286 278 @Test 287 public void test_copyMyNodesBeforeCurrent_1() throws IllegalAccessException, NoSuchFieldException { 288 NodeListMergeModel model = new NodeListMergeModel(); 289 290 Way myWay = new Way(1); 291 myWay.setIncomplete(false); 279 public void test_copyMyNodesBeforeCurrent_1() { 280 NodeListMergeModel model = new NodeListMergeModel(); 281 282 Way myWay = new Way(1, 1); 292 283 myWay.addNode(new Node(1)); 293 284 myWay.addNode(new Node(2)); … … 314 305 315 306 @Test 316 public void test_copyMyNodesBeforeCurrent_2() throws IllegalAccessException, NoSuchFieldException { 317 NodeListMergeModel model = new NodeListMergeModel(); 318 319 Way myWay = new Way(1); 320 myWay.setIncomplete(false); 307 public void test_copyMyNodesBeforeCurrent_2() { 308 NodeListMergeModel model = new NodeListMergeModel(); 309 310 Way myWay = new Way(1, 1); 321 311 myWay.addNode(new Node(1)); 322 312 myWay.addNode(new Node(2)); … … 343 333 344 334 @Test 345 public void test_copyMyNodesBeforeCurrent_3() throws IllegalAccessException, NoSuchFieldException { 346 NodeListMergeModel model = new NodeListMergeModel(); 347 348 Way myWay = new Way(1); 349 myWay.setIncomplete(false); 335 public void test_copyMyNodesBeforeCurrent_3() { 336 NodeListMergeModel model = new NodeListMergeModel(); 337 338 Way myWay = new Way(1, 1); 350 339 myWay.addNode(new Node(1)); 351 340 myWay.addNode(new Node(2)); … … 377 366 /* ----------------------------------------------------------------------------- */ 378 367 @Test 379 public void test_copyMyNodesAfterCurrent_1() throws IllegalAccessException, NoSuchFieldException { 380 NodeListMergeModel model = new NodeListMergeModel(); 381 382 Way myWay = new Way(1); 383 myWay.setIncomplete(false); 368 public void test_copyMyNodesAfterCurrent_1() { 369 NodeListMergeModel model = new NodeListMergeModel(); 370 371 Way myWay = new Way(1, 1); 384 372 myWay.addNode(new Node(1)); 385 373 myWay.addNode(new Node(2)); … … 406 394 407 395 @Test 408 public void test_copyMyNodesAfterCurrent_2() throws IllegalAccessException, NoSuchFieldException { 409 NodeListMergeModel model = new NodeListMergeModel(); 410 411 Way myWay = new Way(1); 412 myWay.setIncomplete(false); 396 public void test_copyMyNodesAfterCurrent_2() { 397 NodeListMergeModel model = new NodeListMergeModel(); 398 399 Way myWay = new Way(1, 1); 413 400 myWay.addNode(new Node(1)); 414 401 myWay.addNode(new Node(2)); … … 437 424 438 425 @Test 439 public void test_copyMyNodesAfterCurrent_3() throws IllegalAccessException, NoSuchFieldException { 440 NodeListMergeModel model = new NodeListMergeModel(); 441 442 Way myWay = new Way(1); 443 myWay.setIncomplete(false); 426 public void test_copyMyNodesAfterCurrent_3() { 427 NodeListMergeModel model = new NodeListMergeModel(); 428 429 Way myWay = new Way(1, 1); 444 430 myWay.addNode(new Node(1)); 445 431 myWay.addNode(new Node(2)); … … 467 453 468 454 @Test 469 public void test_copyMyNodesAfterCurrent_4() throws IllegalAccessException, NoSuchFieldException { 470 NodeListMergeModel model = new NodeListMergeModel(); 471 472 Way myWay = new Way(1); 473 myWay.setIncomplete(false); 455 public void test_copyMyNodesAfterCurrent_4() { 456 NodeListMergeModel model = new NodeListMergeModel(); 457 458 Way myWay = new Way(1, 1); 474 459 myWay.addNode(new Node(1)); 475 460 myWay.addNode(new Node(2)); … … 501 486 /* ----------------------------------------------------------------------------- */ 502 487 @Test 503 public void test_moveUpMergedNodes_1() throws IllegalAccessException, NoSuchFieldException { 504 NodeListMergeModel model = new NodeListMergeModel(); 505 506 Way myWay = new Way(1); 507 myWay.setIncomplete(false); 488 public void test_moveUpMergedNodes_1() { 489 NodeListMergeModel model = new NodeListMergeModel(); 490 491 Way myWay = new Way(1, 1); 508 492 myWay.addNode(new Node(1)); 509 493 myWay.addNode(new Node(2)); … … 528 512 529 513 @Test 530 public void test_moveUpMergedNodes_2() throws IllegalAccessException, NoSuchFieldException { 531 NodeListMergeModel model = new NodeListMergeModel(); 532 533 Way myWay = new Way(1); 534 myWay.setIncomplete(false); 514 public void test_moveUpMergedNodes_2() { 515 NodeListMergeModel model = new NodeListMergeModel(); 516 517 Way myWay = new Way(1, 1); 535 518 myWay.addNode(new Node(1)); 536 519 myWay.addNode(new Node(2)); … … 559 542 560 543 @Test 561 public void test_moveUpMergedNodes_3() throws IllegalAccessException, NoSuchFieldException { 562 NodeListMergeModel model = new NodeListMergeModel(); 563 564 Way myWay = new Way(1); 565 myWay.setIncomplete(false); 544 public void test_moveUpMergedNodes_3() { 545 NodeListMergeModel model = new NodeListMergeModel(); 546 547 Way myWay = new Way(1, 1); 566 548 myWay.addNode(new Node(1)); 567 549 myWay.addNode(new Node(2)); … … 593 575 /* ----------------------------------------------------------------------------- */ 594 576 @Test 595 public void test_moveDownMergedNodes_1() throws IllegalAccessException, NoSuchFieldException { 596 NodeListMergeModel model = new NodeListMergeModel(); 597 598 Way myWay = new Way(1); 599 myWay.setIncomplete(false); 577 public void test_moveDownMergedNodes_1() { 578 NodeListMergeModel model = new NodeListMergeModel(); 579 580 Way myWay = new Way(1, 1); 600 581 myWay.addNode(new Node(1)); 601 582 myWay.addNode(new Node(2)); … … 620 601 621 602 @Test 622 public void test_moveDownMergedNodes_2() throws IllegalAccessException, NoSuchFieldException { 623 NodeListMergeModel model = new NodeListMergeModel(); 624 625 Way myWay = new Way(1); 626 myWay.setIncomplete(false); 603 public void test_moveDownMergedNodes_2() { 604 NodeListMergeModel model = new NodeListMergeModel(); 605 606 Way myWay = new Way(1, 1); 627 607 myWay.addNode(new Node(1)); 628 608 myWay.addNode(new Node(2)); … … 651 631 652 632 @Test 653 public void test_moveDownMergedNodes_3() throws IllegalAccessException, NoSuchFieldException { 654 NodeListMergeModel model = new NodeListMergeModel(); 655 656 Way myWay = new Way(1); 657 myWay.setIncomplete(false); 633 public void test_moveDownMergedNodes_3() { 634 NodeListMergeModel model = new NodeListMergeModel(); 635 636 Way myWay = new Way(1, 1); 658 637 myWay.addNode(new Node(1)); 659 638 myWay.addNode(new Node(2));
Note:
See TracChangeset
for help on using the changeset viewer.