Changeset 2077 in josm for trunk/test/unit/org/openstreetmap/josm/gui/conflict/nodes
 Timestamp:
 20090907T23:06:19+02:00 (15 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/test/unit/org/openstreetmap/josm/gui/conflict/nodes/NodeListMergeModelTest.java
r1954 r2077 65 65 66 66 Way myWay = new Way(1); 67 myWay.incomplete = false; 67 68 myWay.addNode(new Node(2)); 68 69 myWay.addNode(new Node(3)); … … 75 76 76 77 assertEquals(1, mergedNodes.size()); 77 assertEquals(2, mergedNodes.get(0). id);78 assertEquals(2, mergedNodes.get(0).getId()); 78 79 79 80 DefaultListSelectionModel mergedSelection = inspectListSelectionModel(model, "mergedEntriesSelectionModel"); … … 89 90 90 91 Way myWay = new Way(1); 92 myWay.incomplete = false; 91 93 myWay.addNode(new Node(2)); 92 94 myWay.addNode(new Node(3)); … … 102 104 mergedNodes = inspectNodeList(model, "Merged"); 103 105 assertEquals(2, mergedNodes.size()); 104 assertEquals(2, mergedNodes.get(0). id);105 assertEquals(1, mergedNodes.get(1). id);106 assertEquals(2, mergedNodes.get(0).getId()); 107 assertEquals(1, mergedNodes.get(1).getId()); 106 108 107 109 DefaultListSelectionModel mergedSelection = inspectListSelectionModel(model, "mergedEntriesSelectionModel"); … … 120 122 121 123 Way myWay = new Way(1); 122 myWay.addNode(new Node(2)); 123 myWay.addNode(new Node(3)); 124 Way theirWay = new Way(1); 124 myWay.incomplete = false; 125 myWay.addNode(new Node(2)); 126 myWay.addNode(new Node(3)); 127 Way theirWay = new Way(1); 128 125 129 126 130 model.populate(myWay, theirWay); … … 133 137 mergedNodes = inspectNodeList(model, "Merged"); 134 138 assertEquals(2, mergedNodes.size()); 135 assertEquals(3, mergedNodes.get(0). id); // my node 3 at position 0136 assertEquals(1, mergedNodes.get(1). id); // already merged node 1 at position 1139 assertEquals(3, mergedNodes.get(0).getId()); // my node 3 at position 0 140 assertEquals(1, mergedNodes.get(1).getId()); // already merged node 1 at position 1 137 141 138 142 DefaultListSelectionModel mergedSelection = inspectListSelectionModel(model, "mergedEntriesSelectionModel"); … … 146 150 147 151 Way myWay = new Way(1); 152 myWay.incomplete = false; 148 153 myWay.addNode(new Node(2)); 149 154 myWay.addNode(new Node(3)); … … 160 165 mergedNodes = inspectNodeList(model, "Merged"); 161 166 assertEquals(3, mergedNodes.size()); 162 assertEquals(3, mergedNodes.get(0). id); // my node 3 at position 0163 assertEquals(4, mergedNodes.get(1). id); // my node 4 at position 1164 assertEquals(1, mergedNodes.get(2). id); // already merged node 1 at position 2167 assertEquals(3, mergedNodes.get(0).getId()); // my node 3 at position 0 168 assertEquals(4, mergedNodes.get(1).getId()); // my node 4 at position 1 169 assertEquals(1, mergedNodes.get(2).getId()); // already merged node 1 at position 2 165 170 166 171 DefaultListSelectionModel mergedSelection = inspectListSelectionModel(model, "mergedEntriesSelectionModel"); … … 174 179 175 180 Way myWay = new Way(1); 181 myWay.incomplete = false; 176 182 myWay.addNode(new Node(2)); 177 183 myWay.addNode(new Node(3)); … … 184 190 185 191 assertEquals(1, mergedNodes.size()); 186 assertEquals(2, mergedNodes.get(0). id);192 assertEquals(2, mergedNodes.get(0).getId()); 187 193 188 194 DefaultListSelectionModel mergedSelection = inspectListSelectionModel(model, "mergedEntriesSelectionModel"); … … 195 201 196 202 Way myWay = new Way(1); 203 myWay.incomplete = false; 197 204 myWay.addNode(new Node(2)); 198 205 myWay.addNode(new Node(3)); … … 208 215 mergedNodes = inspectNodeList(model, "Merged"); 209 216 assertEquals(2, mergedNodes.size()); 210 assertEquals(1, mergedNodes.get(0). id); // already merged node 1 at position 0211 assertEquals(2, mergedNodes.get(1). id); // copied node 2 at position 1217 assertEquals(1, mergedNodes.get(0).getId()); // already merged node 1 at position 0 218 assertEquals(2, mergedNodes.get(1).getId()); // copied node 2 at position 1 212 219 213 220 DefaultListSelectionModel mergedSelection = inspectListSelectionModel(model, "mergedEntriesSelectionModel"); … … 221 228 222 229 Way myWay = new Way(1); 230 myWay.incomplete = false; 223 231 myWay.addNode(new Node(2)); 224 232 myWay.addNode(new Node(3)); … … 234 242 mergedNodes = inspectNodeList(model, "Merged"); 235 243 assertEquals(2, mergedNodes.size()); 236 assertEquals(1, mergedNodes.get(0). id); // already merged node 1 at position 0237 assertEquals(3, mergedNodes.get(1). id); // my node 3 at position 1244 assertEquals(1, mergedNodes.get(0).getId()); // already merged node 1 at position 0 245 assertEquals(3, mergedNodes.get(1).getId()); // my node 3 at position 1 238 246 239 247 … … 248 256 249 257 Way myWay = new Way(1); 258 myWay.incomplete = false; 250 259 myWay.addNode(new Node(2)); 251 260 myWay.addNode(new Node(3)); … … 262 271 mergedNodes = inspectNodeList(model, "Merged"); 263 272 assertEquals(3, mergedNodes.size()); 264 assertEquals(1, mergedNodes.get(0). id); // already merged node 1 at position 0265 assertEquals(3, mergedNodes.get(1). id); // my node 3 at position 1266 assertEquals(4, mergedNodes.get(2). id); // my node 4 at position 2273 assertEquals(1, mergedNodes.get(0).getId()); // already merged node 1 at position 0 274 assertEquals(3, mergedNodes.get(1).getId()); // my node 3 at position 1 275 assertEquals(4, mergedNodes.get(2).getId()); // my node 4 at position 2 267 276 268 277 … … 280 289 281 290 Way myWay = new Way(1); 291 myWay.incomplete = false; 282 292 myWay.addNode(new Node(1)); 283 293 myWay.addNode(new Node(2)); … … 293 303 294 304 assertEquals(4, mergedNodes.size()); 295 assertEquals(10, mergedNodes.get(0). id); // already merged node296 assertEquals(1, mergedNodes.get(1). id); // copied node 1 at position 1297 assertEquals(11, mergedNodes.get(2). id); // already merged node298 assertEquals(12, mergedNodes.get(3). id); // already merged node305 assertEquals(10, mergedNodes.get(0).getId()); // already merged node 306 assertEquals(1, mergedNodes.get(1).getId()); // copied node 1 at position 1 307 assertEquals(11, mergedNodes.get(2).getId()); // already merged node 308 assertEquals(12, mergedNodes.get(3).getId()); // already merged node 299 309 300 310 DefaultListSelectionModel mergedSelection = inspectListSelectionModel(model, "mergedEntriesSelectionModel"); … … 308 318 309 319 Way myWay = new Way(1); 320 myWay.incomplete = false; 310 321 myWay.addNode(new Node(1)); 311 322 myWay.addNode(new Node(2)); … … 321 332 322 333 assertEquals(5, mergedNodes.size()); 323 assertEquals(1, mergedNodes.get(0). id); // copied node 1 at position 0324 assertEquals(2, mergedNodes.get(1). id); // copied node 2 at position 1325 assertEquals(10, mergedNodes.get(2). id); // already merged node326 assertEquals(11, mergedNodes.get(3). id); // already merged node327 assertEquals(12, mergedNodes.get(4). id); // already merged node334 assertEquals(1, mergedNodes.get(0).getId()); // copied node 1 at position 0 335 assertEquals(2, mergedNodes.get(1).getId()); // copied node 2 at position 1 336 assertEquals(10, mergedNodes.get(2).getId()); // already merged node 337 assertEquals(11, mergedNodes.get(3).getId()); // already merged node 338 assertEquals(12, mergedNodes.get(4).getId()); // already merged node 328 339 329 340 DefaultListSelectionModel mergedSelection = inspectListSelectionModel(model, "mergedEntriesSelectionModel"); … … 336 347 337 348 Way myWay = new Way(1); 349 myWay.incomplete = false; 338 350 myWay.addNode(new Node(1)); 339 351 myWay.addNode(new Node(2)); … … 369 381 370 382 Way myWay = new Way(1); 383 myWay.incomplete = false; 371 384 myWay.addNode(new Node(1)); 372 385 myWay.addNode(new Node(2)); … … 382 395 383 396 assertEquals(4, mergedNodes.size()); 384 assertEquals(10, mergedNodes.get(0). id); // already merged node385 assertEquals(11, mergedNodes.get(1). id); // already merged node386 assertEquals(1, mergedNodes.get(2). id); // copied node 1 at position 2387 assertEquals(12, mergedNodes.get(3). id); // already merged node397 assertEquals(10, mergedNodes.get(0).getId()); // already merged node 398 assertEquals(11, mergedNodes.get(1).getId()); // already merged node 399 assertEquals(1, mergedNodes.get(2).getId()); // copied node 1 at position 2 400 assertEquals(12, mergedNodes.get(3).getId()); // already merged node 388 401 389 402 DefaultListSelectionModel mergedSelection = inspectListSelectionModel(model, "mergedEntriesSelectionModel"); … … 397 410 398 411 Way myWay = new Way(1); 412 myWay.incomplete = false; 399 413 myWay.addNode(new Node(1)); 400 414 myWay.addNode(new Node(2)); … … 411 425 412 426 assertEquals(5, mergedNodes.size()); 413 assertEquals(10, mergedNodes.get(0). id); // already merged node414 assertEquals(11, mergedNodes.get(1). id); // already merged node415 assertEquals(12, mergedNodes.get(2). id); // already merged node416 assertEquals(1, mergedNodes.get(3). id); // copied node 1 at position 3417 assertEquals(2, mergedNodes.get(4). id); // copied node 2 at position 4427 assertEquals(10, mergedNodes.get(0).getId()); // already merged node 428 assertEquals(11, mergedNodes.get(1).getId()); // already merged node 429 assertEquals(12, mergedNodes.get(2).getId()); // already merged node 430 assertEquals(1, mergedNodes.get(3).getId()); // copied node 1 at position 3 431 assertEquals(2, mergedNodes.get(4).getId()); // copied node 2 at position 4 418 432 419 433 … … 427 441 428 442 Way myWay = new Way(1); 443 myWay.incomplete = false; 429 444 myWay.addNode(new Node(1)); 430 445 myWay.addNode(new Node(2)); … … 441 456 442 457 assertEquals(5, mergedNodes.size()); 443 assertEquals(10, mergedNodes.get(0). id); // already merged node444 assertEquals(1, mergedNodes.get(1). id); // copied node 1 at position 1445 assertEquals(3, mergedNodes.get(2). id); // copied node 3 at position 2446 assertEquals(11, mergedNodes.get(3). id); // already merged node447 assertEquals(12, mergedNodes.get(4). id); // already merged node458 assertEquals(10, mergedNodes.get(0).getId()); // already merged node 459 assertEquals(1, mergedNodes.get(1).getId()); // copied node 1 at position 1 460 assertEquals(3, mergedNodes.get(2).getId()); // copied node 3 at position 2 461 assertEquals(11, mergedNodes.get(3).getId()); // already merged node 462 assertEquals(12, mergedNodes.get(4).getId()); // already merged node 448 463 449 464 DefaultListSelectionModel mergedSelection = inspectListSelectionModel(model, "mergedEntriesSelectionModel"); … … 456 471 457 472 Way myWay = new Way(1); 473 myWay.incomplete = false; 458 474 myWay.addNode(new Node(1)); 459 475 myWay.addNode(new Node(2)); … … 489 505 490 506 Way myWay = new Way(1); 507 myWay.incomplete = false; 491 508 myWay.addNode(new Node(1)); 492 509 myWay.addNode(new Node(2)); … … 502 519 503 520 assertEquals(3, mergedNodes.size()); 504 assertEquals(11, mergedNodes.get(0). id);505 assertEquals(10, mergedNodes.get(1). id);506 assertEquals(12, mergedNodes.get(2). id);521 assertEquals(11, mergedNodes.get(0).getId()); 522 assertEquals(10, mergedNodes.get(1).getId()); 523 assertEquals(12, mergedNodes.get(2).getId()); 507 524 508 525 DefaultListSelectionModel mergedSelection = inspectListSelectionModel(model, "mergedEntriesSelectionModel"); … … 515 532 516 533 Way myWay = new Way(1); 534 myWay.incomplete = false; 517 535 myWay.addNode(new Node(1)); 518 536 myWay.addNode(new Node(2)); … … 530 548 531 549 assertEquals(5, mergedNodes.size()); 532 assertEquals(11, mergedNodes.get(0). id);533 assertEquals(10, mergedNodes.get(1). id);534 assertEquals(12, mergedNodes.get(2). id);535 assertEquals(14, mergedNodes.get(3). id);536 assertEquals(13, mergedNodes.get(4). id);550 assertEquals(11, mergedNodes.get(0).getId()); 551 assertEquals(10, mergedNodes.get(1).getId()); 552 assertEquals(12, mergedNodes.get(2).getId()); 553 assertEquals(14, mergedNodes.get(3).getId()); 554 assertEquals(13, mergedNodes.get(4).getId()); 537 555 538 556 DefaultListSelectionModel mergedSelection = inspectListSelectionModel(model, "mergedEntriesSelectionModel"); … … 545 563 546 564 Way myWay = new Way(1); 565 myWay.incomplete = false; 547 566 myWay.addNode(new Node(1)); 548 567 myWay.addNode(new Node(2)); … … 560 579 561 580 assertEquals(5, mergedNodes.size()); 562 assertEquals(11, mergedNodes.get(0). id);563 assertEquals(12, mergedNodes.get(1). id);564 assertEquals(13, mergedNodes.get(2). id);565 assertEquals(14, mergedNodes.get(3). id);566 assertEquals(10, mergedNodes.get(4). id);581 assertEquals(11, mergedNodes.get(0).getId()); 582 assertEquals(12, mergedNodes.get(1).getId()); 583 assertEquals(13, mergedNodes.get(2).getId()); 584 assertEquals(14, mergedNodes.get(3).getId()); 585 assertEquals(10, mergedNodes.get(4).getId()); 567 586 568 587 DefaultListSelectionModel mergedSelection = inspectListSelectionModel(model, "mergedEntriesSelectionModel"); … … 578 597 579 598 Way myWay = new Way(1); 599 myWay.incomplete = false; 580 600 myWay.addNode(new Node(1)); 581 601 myWay.addNode(new Node(2)); … … 591 611 592 612 assertEquals(3, mergedNodes.size()); 593 assertEquals(10, mergedNodes.get(0). id);594 assertEquals(12, mergedNodes.get(1). id);595 assertEquals(11, mergedNodes.get(2). id);613 assertEquals(10, mergedNodes.get(0).getId()); 614 assertEquals(12, mergedNodes.get(1).getId()); 615 assertEquals(11, mergedNodes.get(2).getId()); 596 616 597 617 DefaultListSelectionModel mergedSelection = inspectListSelectionModel(model, "mergedEntriesSelectionModel"); … … 604 624 605 625 Way myWay = new Way(1); 626 myWay.incomplete = false; 606 627 myWay.addNode(new Node(1)); 607 628 myWay.addNode(new Node(2)); … … 619 640 620 641 assertEquals(5, mergedNodes.size()); 621 assertEquals(10, mergedNodes.get(0). id);622 assertEquals(12, mergedNodes.get(1). id);623 assertEquals(11, mergedNodes.get(2). id);624 assertEquals(14, mergedNodes.get(3). id);625 assertEquals(13, mergedNodes.get(4). id);642 assertEquals(10, mergedNodes.get(0).getId()); 643 assertEquals(12, mergedNodes.get(1).getId()); 644 assertEquals(11, mergedNodes.get(2).getId()); 645 assertEquals(14, mergedNodes.get(3).getId()); 646 assertEquals(13, mergedNodes.get(4).getId()); 626 647 627 648 DefaultListSelectionModel mergedSelection = inspectListSelectionModel(model, "mergedEntriesSelectionModel"); … … 634 655 635 656 Way myWay = new Way(1); 657 myWay.incomplete = false; 636 658 myWay.addNode(new Node(1)); 637 659 myWay.addNode(new Node(2)); … … 649 671 650 672 assertEquals(5, mergedNodes.size()); 651 assertEquals(10, mergedNodes.get(0). id);652 assertEquals(14, mergedNodes.get(1). id);653 assertEquals(11, mergedNodes.get(2). id);654 assertEquals(12, mergedNodes.get(3). id);655 assertEquals(13, mergedNodes.get(4). id);673 assertEquals(10, mergedNodes.get(0).getId()); 674 assertEquals(14, mergedNodes.get(1).getId()); 675 assertEquals(11, mergedNodes.get(2).getId()); 676 assertEquals(12, mergedNodes.get(3).getId()); 677 assertEquals(13, mergedNodes.get(4).getId()); 656 678 657 679 DefaultListSelectionModel mergedSelection = inspectListSelectionModel(model, "mergedEntriesSelectionModel");
Note:
See TracChangeset
for help on using the changeset viewer.