Changeset 2077 in josm for trunk/test/functional/org/openstreetmap
- Timestamp:
- 2009-09-07T23:06:19+02:00 (15 years ago)
- Location:
- trunk/test/functional/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/functional/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMergerTest.java
r2041 r2077 26 26 Node my = new Node(1); 27 27 my.setCoor(new LatLon(1,1)); 28 my. deleted = true;28 my.setDeleted(true); 29 29 30 30 Node their = new Node(2); -
trunk/test/functional/org/openstreetmap/josm/io/MultiFetchServerObjectReaderTest.java
r2072 r2077 28 28 import org.openstreetmap.josm.data.osm.Node; 29 29 import org.openstreetmap.josm.data.osm.OsmPrimitive; 30 import org.openstreetmap.josm.data.osm.OsmPrimitiveType; 30 31 import org.openstreetmap.josm.data.osm.Relation; 31 32 import org.openstreetmap.josm.data.osm.RelationMember; … … 247 248 while(it.hasNext()) { 248 249 Node n1 = it.next(); 249 Node n2 = (Node)ds.getPrimitiveById(n1. id);250 Node n2 = (Node)ds.getPrimitiveById(n1.getId(), OsmPrimitiveType.NODE); 250 251 assertNotNull(n2); 251 252 assertEquals(n2.get("name"),n2.get("name")); … … 266 267 while(it.hasNext()) { 267 268 Way w1 = it.next(); 268 Way w2 = (Way)ds.getPrimitiveById(w1. id);269 Way w2 = (Way)ds.getPrimitiveById(w1.getId(), OsmPrimitiveType.WAY); 269 270 assertNotNull(w2); 270 271 assertEquals(w2.getNodesCount(), w1.getNodesCount()); … … 286 287 while(it.hasNext()) { 287 288 Relation r1 = it.next(); 288 Relation r2 = (Relation)ds.getPrimitiveById(r1. id);289 Relation r2 = (Relation)ds.getPrimitiveById(r1.getId(), OsmPrimitiveType.RELATION); 289 290 assertNotNull(r2); 290 291 assertEquals(r2.getMembersCount(), r1.getMembersCount()); … … 306 307 while(it.hasNext()) { 307 308 Node n1 = it.next(); 308 Node n2 = (Node)ds.getPrimitiveById(n1. id);309 Node n2 = (Node)ds.getPrimitiveById(n1.getId(), OsmPrimitiveType.NODE); 309 310 assertNotNull(n2); 310 311 assertEquals(n2.get("name"),n2.get("name")); … … 327 328 while(it.hasNext()) { 328 329 Node n1 = it.next(); 329 Node n2 = (Node)ds.getPrimitiveById(n1. id);330 Node n2 = (Node)ds.getPrimitiveById(n1.getId(), OsmPrimitiveType.NODE); 330 331 assertNotNull(n2); 331 332 assertEquals(n2.get("name"),n2.get("name")); -
trunk/test/functional/org/openstreetmap/josm/io/OsmServerBackreferenceReaderTest.java
r2072 r2077 27 27 import org.openstreetmap.josm.data.osm.Node; 28 28 import org.openstreetmap.josm.data.osm.OsmPrimitive; 29 import org.openstreetmap.josm.data.osm.OsmPrimitiveType; 29 30 import org.openstreetmap.josm.data.osm.Relation; 30 31 import org.openstreetmap.josm.data.osm.RelationMember; … … 253 254 assertEquals(0, referers.relations.size()); 254 255 for (Way way: referers.ways) { 255 assertEquals(w. id, way.id);256 assertEquals(w.getId(), way.getId()); 256 257 assertEquals(false, way.incomplete); 257 258 } … … 272 273 assertEquals(0, referers.relations.size()); 273 274 for (Way way: referers.ways) { 274 assertEquals(w. id, way.id);275 assertEquals(w.getId(), way.getId()); 275 276 assertEquals(false, way.incomplete); 276 277 assertEquals(10, w.getNodesCount()); … … 319 320 Set<Long> expectedNodeIds = new HashSet<Long>(); 320 321 for (Way way: referers.ways) { 321 Way orig = (Way)ds.getPrimitiveById(way. id);322 Way orig = (Way)ds.getPrimitiveById(way.getId(), OsmPrimitiveType.WAY); 322 323 for(Node n: orig.getNodes()) { 323 expectedNodeIds.add(n. id);324 expectedNodeIds.add(n.getId()); 324 325 } 325 326 } 326 327 assertEquals(expectedNodeIds.size(), referers.nodes.size()); 327 328 for (Node n : referers.nodes) { 328 assertEquals(true, expectedNodeIds.contains(n. id));329 assertEquals(true, expectedNodeIds.contains(n.getId())); 329 330 } 330 331 … … 352 353 assertNotNull(r); 353 354 assertEquals(false, r.incomplete); 354 referringRelationsIds.add(r. id);355 referringRelationsIds.add(r.getId()); 355 356 r = lookupRelation(referers, 7); 356 357 assertNotNull(r); 357 358 assertEquals(false, r.incomplete); 358 referringRelationsIds.add(r. id);359 referringRelationsIds.add(r.getId()); 359 360 r = lookupRelation(referers, 8); 360 361 assertNotNull(r); 361 362 assertEquals(false, r.incomplete); 362 referringRelationsIds.add(r. id);363 referringRelationsIds.add(r.getId()); 363 364 r = lookupRelation(referers, 9); 364 365 assertNotNull(r); 365 366 assertEquals(false, r.incomplete); 366 referringRelationsIds.add(r. id);367 referringRelationsIds.add(r.getId()); 367 368 368 369 for (Relation r1: referers.relations) { 369 if (! referringRelationsIds.contains(r1. id)) {370 if (! referringRelationsIds.contains(r1.getId())) { 370 371 assertEquals(true, r1.incomplete); 371 372 } … … 378 379 for (RelationMember m : lookupRelation(ds, 6).getMembers()) { 379 380 if (m.isWay()) { 380 expectedWayIds.add(m.getMember(). id);381 expectedWayIds.add(m.getMember().getId()); 381 382 } 382 383 } 383 384 for (RelationMember m : lookupRelation(ds, 7).getMembers()) { 384 385 if (m.isWay()) { 385 expectedWayIds.add(m.getMember(). id);386 expectedWayIds.add(m.getMember().getId()); 386 387 } 387 388 } 388 389 for (RelationMember m : lookupRelation(ds, 8).getMembers()) { 389 390 if (m.isWay()) { 390 expectedWayIds.add(m.getMember(). id);391 expectedWayIds.add(m.getMember().getId()); 391 392 } 392 393 } 393 394 for (RelationMember m : lookupRelation(ds, 9).getMembers()) { 394 395 if (m.isWay()) { 395 expectedWayIds.add(m.getMember(). id);396 expectedWayIds.add(m.getMember().getId()); 396 397 } 397 398 } … … 399 400 assertEquals(expectedWayIds.size(), referers.ways.size()); 400 401 for (Way w1 : referers.ways) { 401 assertEquals(true, expectedWayIds.contains(w1. id));402 assertEquals(true, expectedWayIds.contains(w1.getId())); 402 403 assertEquals(true, w1.incomplete); 403 404 } … … 412 413 if (way == null)return ret; 413 414 for (Node n: way.getNodes()) { 414 ret.add(n. id);415 ret.add(n.getId()); 415 416 } 416 417 return ret; … … 422 423 for (RelationMember m: r.getMembers()) { 423 424 if (m.isNode()) { 424 ret.add(m.getMember(). id);425 ret.add(m.getMember().getId()); 425 426 } else if (m.isWay()) { 426 427 ret.addAll(getNodeIdsInWay(m.getWay())); … … 448 449 assertNotNull(r); 449 450 assertEquals(false, r.incomplete); 450 referringRelationsIds.add(r. id);451 referringRelationsIds.add(r.getId()); 451 452 r = lookupRelation(referers, 7); 452 453 assertNotNull(r); 453 454 assertEquals(false, r.incomplete); 454 referringRelationsIds.add(r. id);455 referringRelationsIds.add(r.getId()); 455 456 r = lookupRelation(referers, 8); 456 457 assertNotNull(r); 457 458 assertEquals(false, r.incomplete); 458 referringRelationsIds.add(r. id);459 referringRelationsIds.add(r.getId()); 459 460 r = lookupRelation(referers, 9); 460 461 assertNotNull(r); 461 462 assertEquals(false, r.incomplete); 462 referringRelationsIds.add(r. id);463 referringRelationsIds.add(r.getId()); 463 464 464 465 // all relations are fully loaded … … 474 475 for (RelationMember m : lookupRelation(ds, 6).getMembers()) { 475 476 if (m.isWay()) { 476 expectedWayIds.add(m.getMember(). id);477 expectedWayIds.add(m.getMember().getId()); 477 478 } 478 479 } 479 480 for (RelationMember m : lookupRelation(ds, 7).getMembers()) { 480 481 if (m.isWay()) { 481 expectedWayIds.add(m.getMember(). id);482 expectedWayIds.add(m.getMember().getId()); 482 483 } 483 484 } 484 485 for (RelationMember m : lookupRelation(ds, 8).getMembers()) { 485 486 if (m.isWay()) { 486 expectedWayIds.add(m.getMember(). id);487 expectedWayIds.add(m.getMember().getId()); 487 488 } 488 489 } 489 490 for (RelationMember m : lookupRelation(ds, 9).getMembers()) { 490 491 if (m.isWay()) { 491 expectedWayIds.add(m.getMember(). id);492 expectedWayIds.add(m.getMember().getId()); 492 493 } 493 494 } 494 495 for (long id : expectedWayIds) { 495 Way w = (Way)referers.getPrimitiveById(id );496 Way w = (Way)referers.getPrimitiveById(id, OsmPrimitiveType.WAY); 496 497 assertNotNull(w); 497 498 assertEquals(false, w.incomplete); … … 506 507 assertEquals(expectedNodeIds.size(), referers.nodes.size()); 507 508 for(Node n : referers.nodes) { 508 assertEquals(true, expectedNodeIds.contains(n. id));509 assertEquals(true, expectedNodeIds.contains(n.getId())); 509 510 } 510 511 }
Note:
See TracChangeset
for help on using the changeset viewer.