Changeset 2381 in josm for trunk/test
- Timestamp:
- 2009-11-02T07:51:28+01:00 (15 years ago)
- Location:
- trunk/test
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/functional/org/openstreetmap/josm/io/MultiFetchServerObjectReaderTest.java
r2199 r2381 35 35 import org.openstreetmap.josm.data.projection.Mercator; 36 36 import org.openstreetmap.josm.gui.progress.NullProgressMonitor; 37 import org.xml.sax.SAXException;38 37 39 38 public class MultiFetchServerObjectReaderTest { … … 124 123 logger.info("creating data set on the server ..."); 125 124 ArrayList<OsmPrimitive> primitives = new ArrayList<OsmPrimitive>(); 126 primitives.addAll(testDataSet. nodes);127 primitives.addAll(testDataSet. ways);128 primitives.addAll(testDataSet. relations);125 primitives.addAll(testDataSet.getNodes()); 126 primitives.addAll(testDataSet.getWays()); 127 primitives.addAll(testDataSet.getRelations()); 129 128 130 129 OsmServerWriter writer = new OsmServerWriter(); … … 247 246 } 248 247 DataSet out = reader.parseOsm(NullProgressMonitor.INSTANCE); 249 assertEquals(10, out. nodes.size());248 assertEquals(10, out.getNodes().size()); 250 249 Iterator<Node> it = out.nodes.iterator(); 251 250 while(it.hasNext()) { … … 261 260 public void testMultiGet10Ways() throws OsmTransferException { 262 261 MultiFetchServerObjectReader reader = new MultiFetchServerObjectReader(); 263 ArrayList<Way> ways= new ArrayList<Way>(ds. ways);262 ArrayList<Way> ways= new ArrayList<Way>(ds.getWays()); 264 263 for (int i =0; i< 10; i++) { 265 264 reader.append(ways.get(i)); 266 265 } 267 266 DataSet out = reader.parseOsm(NullProgressMonitor.INSTANCE); 268 assertEquals(10, out.ways.size()); 269 Iterator<Way> it = out.ways.iterator(); 270 while(it.hasNext()) { 271 Way w1 = it.next(); 267 assertEquals(10, out.getWays().size()); 268 for (Way w1: out.getWays()) { 272 269 Way w2 = (Way)ds.getPrimitiveById(w1.getId(), OsmPrimitiveType.WAY); 273 270 assertNotNull(w2); … … 281 278 public void testMultiGet10Relations() throws OsmTransferException { 282 279 MultiFetchServerObjectReader reader = new MultiFetchServerObjectReader(); 283 ArrayList<Relation> relations= new ArrayList<Relation>(ds. relations);280 ArrayList<Relation> relations= new ArrayList<Relation>(ds.getRelations()); 284 281 for (int i =0; i< 10; i++) { 285 282 reader.append(relations.get(i)); 286 283 } 287 284 DataSet out = reader.parseOsm(NullProgressMonitor.INSTANCE); 288 assertEquals(10, out.relations.size()); 289 Iterator<Relation> it = out.relations.iterator(); 290 while(it.hasNext()) { 291 Relation r1 = it.next(); 285 assertEquals(10, out.getRelations().size()); 286 for (Relation r1: out.getRelations()) { 292 287 Relation r2 = (Relation)ds.getPrimitiveById(r1.getId(), OsmPrimitiveType.RELATION); 293 288 assertNotNull(r2); … … 301 296 public void testMultiGet800Nodes() throws OsmTransferException { 302 297 MultiFetchServerObjectReader reader = new MultiFetchServerObjectReader(); 303 ArrayList<Node> nodes = new ArrayList<Node>(ds. nodes);298 ArrayList<Node> nodes = new ArrayList<Node>(ds.getNodes()); 304 299 for (int i =0; i< 812; i++) { 305 300 reader.append(nodes.get(i)); 306 301 } 307 302 DataSet out = reader.parseOsm(NullProgressMonitor.INSTANCE); 308 assertEquals(812, out. nodes.size());303 assertEquals(812, out.getNodes().size()); 309 304 Iterator<Node> it = out.nodes.iterator(); 310 305 while(it.hasNext()) { … … 320 315 public void multiGetWithNonExistingNode() throws OsmTransferException { 321 316 MultiFetchServerObjectReader reader = new MultiFetchServerObjectReader(); 322 ArrayList<Node> nodes = new ArrayList<Node>(ds. nodes);317 ArrayList<Node> nodes = new ArrayList<Node>(ds.getNodes()); 323 318 for (int i =0; i< 10; i++) { 324 319 reader.append(nodes.get(i)); … … 327 322 reader.append(n); // doesn't exist 328 323 DataSet out = reader.parseOsm(NullProgressMonitor.INSTANCE); 329 assertEquals(10, out.nodes.size()); 330 Iterator<Node> it = out.nodes.iterator(); 331 while(it.hasNext()) { 332 Node n1 = it.next(); 324 assertEquals(10, out.getNodes().size()); 325 for (Node n1:out.getNodes()) { 333 326 Node n2 = (Node)ds.getPrimitiveById(n1.getId(), OsmPrimitiveType.NODE); 334 327 assertNotNull(n2); -
trunk/test/functional/org/openstreetmap/josm/io/OsmServerBackreferenceReaderTest.java
r2199 r2381 34 34 import org.openstreetmap.josm.data.projection.Mercator; 35 35 import org.openstreetmap.josm.gui.progress.NullProgressMonitor; 36 import org.xml.sax.SAXException;37 36 38 37 public class OsmServerBackreferenceReaderTest { … … 40 39 41 40 protected static Node lookupNode(DataSet ds, int i) { 42 for (Node n : ds.nodes) {41 for (Node n : ds.getNodes()) { 43 42 if (("node-" + i).equals(n.get("name"))) return n; 44 43 } … … 48 47 49 48 protected static Way lookupWay(DataSet ds, int i) { 50 for (Way w : ds.ways) {49 for (Way w : ds.getWays()) { 51 50 if (("way-" + i).equals(w.get("name"))) return w; 52 51 } … … 55 54 56 55 protected static Relation lookupRelation(DataSet ds, int i) { 57 for (Relation r : ds.relations) {56 for (Relation r : ds.getRelations()) { 58 57 if (("relation-" + i).equals(r.get("name"))) return r; 59 58 } … … 103 102 } 104 103 } 105 ds. relations.add(r);104 ds.addPrimitive(r); 106 105 } 107 106 } … … 127 126 logger.info("creating data set on the server ..."); 128 127 ArrayList<OsmPrimitive> primitives = new ArrayList<OsmPrimitive>(); 129 primitives.addAll(ds. nodes);130 primitives.addAll(ds. ways);131 primitives.addAll(ds. relations);128 primitives.addAll(ds.getNodes()); 129 primitives.addAll(ds.getWays()); 130 primitives.addAll(ds.getRelations()); 132 131 OsmServerWriter writer = new OsmServerWriter(); 133 132 Changeset cs = new Changeset(); … … 253 252 reader.setReadFull(false); 254 253 DataSet referers = reader.parseOsm(NullProgressMonitor.INSTANCE); 255 assertEquals(10, referers. nodes.size());256 assertEquals(1, referers. ways.size());257 assertEquals(0, referers. relations.size());258 for (Way way : referers.ways) {254 assertEquals(10, referers.getNodes().size()); 255 assertEquals(1, referers.getWays().size()); 256 assertEquals(0, referers.getRelations().size()); 257 for (Way way : referers.getWays()) { 259 258 assertEquals(w.getId(), way.getId()); 260 259 assertEquals(false, way.incomplete); … … 272 271 reader.setReadFull(true); 273 272 DataSet referers = reader.parseOsm(NullProgressMonitor.INSTANCE); 274 assertEquals(10, referers. nodes.size());275 assertEquals(1, referers. ways.size());276 assertEquals(0, referers. relations.size());277 for (Way way : referers.ways) {273 assertEquals(10, referers.getNodes().size()); 274 assertEquals(1, referers.getWays().size()); 275 assertEquals(0, referers.getRelations().size()); 276 for (Way way : referers.getWays()) { 278 277 assertEquals(w.getId(), way.getId()); 279 278 assertEquals(false, way.incomplete); … … 292 291 reader.setReadFull(false); 293 292 DataSet referers = reader.parseOsm(NullProgressMonitor.INSTANCE); 294 assertEquals(0, referers. nodes.size()); // no nodes loaded295 assertEquals(6, referers. ways.size()); // 6 ways referred by two relations296 for (Way w1 : referers.ways) {293 assertEquals(0, referers.getNodes().size()); // no nodes loaded 294 assertEquals(6, referers.getWays().size()); // 6 ways referred by two relations 295 for (Way w1 : referers.getWays()) { 297 296 assertEquals(true, w1.incomplete); 298 297 } 299 assertEquals(2, referers. relations.size()); // two relations referring to w298 assertEquals(2, referers.getRelations().size()); // two relations referring to w 300 299 301 300 Relation r = lookupRelation(referers, 0); … … 316 315 reader.setReadFull(true); 317 316 DataSet referers = reader.parseOsm(NullProgressMonitor.INSTANCE); 318 assertEquals(6, referers. ways.size()); // 6 ways referred by two relations319 for (Way w1 : referers.ways) {317 assertEquals(6, referers.getWays().size()); // 6 ways referred by two relations 318 for (Way w1 : referers.getWays()) { 320 319 assertEquals(false, w1.incomplete); 321 320 } 322 assertEquals(2, referers. relations.size()); // two relations referring to321 assertEquals(2, referers.getRelations().size()); // two relations referring to 323 322 Set<Long> expectedNodeIds = new HashSet<Long>(); 324 for (Way way : referers.ways) {325 Way orig = (Way) ds.getPrimitiveById(way.getId(), OsmPrimitiveType.WAY);326 for (Node n: orig.getNodes()) {323 for (Way way : referers.getWays()) { 324 Way orig = (Way) ds.getPrimitiveById(way.getId(), OsmPrimitiveType.WAY); 325 for (Node n : orig.getNodes()) { 327 326 expectedNodeIds.add(n.getId()); 328 327 } 329 328 } 330 assertEquals(expectedNodeIds.size(), referers. nodes.size());331 for (Node n : referers. nodes) {329 assertEquals(expectedNodeIds.size(), referers.getNodes().size()); 330 for (Node n : referers.getNodes()) { 332 331 assertEquals(true, expectedNodeIds.contains(n.getId())); 333 332 } … … 342 341 @Test 343 342 public void testBackrefrenceForRelation() throws OsmTransferException { 344 Relation r = lookupRelation(ds, 1);343 Relation r = lookupRelation(ds, 1); 345 344 assertNotNull(r); 346 345 // way with name "relation-1" is referred to by four relations: … … 370 369 referringRelationsIds.add(r.getId()); 371 370 372 for (Relation r1 : referers.relations) {373 if (! 371 for (Relation r1 : referers.getRelations()) { 372 if (!referringRelationsIds.contains(r1.getId())) { 374 373 assertEquals(true, r1.incomplete); 375 374 } … … 401 400 } 402 401 403 assertEquals(expectedWayIds.size(), referers. ways.size());404 for (Way w1 : referers. ways) {402 assertEquals(expectedWayIds.size(), referers.getWays().size()); 403 for (Way w1 : referers.getWays()) { 405 404 assertEquals(true, expectedWayIds.contains(w1.getId())); 406 405 assertEquals(true, w1.incomplete); … … 409 408 // make sure we didn't read any nodes 410 409 // 411 assertEquals(0, referers. nodes.size());410 assertEquals(0, referers.getNodes().size()); 412 411 } 413 412 … … 438 437 @Test 439 438 public void testBackrefrenceForRelation_Full() throws OsmTransferException { 440 Relation r = lookupRelation(ds, 1);439 Relation r = lookupRelation(ds, 1); 441 440 assertNotNull(r); 442 441 // way with name "relation-1" is referred to by four relations: … … 468 467 // all relations are fully loaded 469 468 // 470 for (Relation r1 : referers.relations) {469 for (Relation r1 : referers.getRelations()) { 471 470 assertEquals(false, r1.incomplete); 472 471 } … … 497 496 } 498 497 for (long id : expectedWayIds) { 499 Way w = (Way) referers.getPrimitiveById(id, OsmPrimitiveType.WAY);498 Way w = (Way) referers.getPrimitiveById(id, OsmPrimitiveType.WAY); 500 499 assertNotNull(w); 501 500 assertEquals(false, w.incomplete); … … 503 502 504 503 Set<Long> expectedNodeIds = new HashSet<Long>(); 505 for (int i=6; i< 10;i++) {504 for (int i = 6; i < 10; i++) { 506 505 Relation r1 = lookupRelation(ds, i); 507 506 expectedNodeIds.addAll(getNodeIdsInRelation(r1)); 508 507 } 509 508 510 assertEquals(expectedNodeIds.size(), referers. nodes.size());511 for (Node n : referers.nodes) {509 assertEquals(expectedNodeIds.size(), referers.getNodes().size()); 510 for (Node n : referers.getNodes()) { 512 511 assertEquals(true, expectedNodeIds.contains(n.getId())); 513 512 } -
trunk/test/unit/org/openstreetmap/josm/data/osm/APIDataSetTest.java
r2168 r2381 20 20 r.incomplete = false; 21 21 DataSet ds = new DataSet(); 22 ds. relations.add(r);22 ds.addPrimitive(r); 23 23 24 24 APIDataSet apiDataSet = new APIDataSet(); … … 48 48 49 49 DataSet ds = new DataSet(); 50 ds. relations.add(r1);51 ds. relations.add(r2);50 ds.addPrimitive(r1); 51 ds.addPrimitive(r2); 52 52 53 53 APIDataSet apiDataSet = new APIDataSet(); … … 88 88 89 89 DataSet ds = new DataSet(); 90 ds. relations.add(r1);91 ds. relations.add(r2);92 ds. relations.add(r3);93 ds. relations.add(r4);90 ds.addPrimitive(r1); 91 ds.addPrimitive(r2); 92 ds.addPrimitive(r3); 93 ds.addPrimitive(r4); 94 94 95 95 APIDataSet apiDataSet = new APIDataSet(); … … 130 130 131 131 DataSet ds = new DataSet(); 132 ds. relations.add(r1);133 ds. relations.add(r2);134 ds. relations.add(r3);132 ds.addPrimitive(r1); 133 ds.addPrimitive(r2); 134 ds.addPrimitive(r3); 135 135 136 136 APIDataSet apiDataSet = new APIDataSet(); … … 167 167 168 168 DataSet ds = new DataSet(); 169 ds. relations.add(r1);170 ds. relations.add(r2);171 ds. relations.add(r3);169 ds.addPrimitive(r1); 170 ds.addPrimitive(r2); 171 ds.addPrimitive(r3); 172 172 173 173 APIDataSet apiDataSet = new APIDataSet(); -
trunk/test/unit/org/openstreetmap/josm/data/osm/visitor/MergeSourceBuildingVisitorTest.java
r2077 r2381 40 40 Node n4 = new Node(new LatLon(20.0,20.0)); 41 41 n4.put("name","n4"); 42 source. nodes.add(n1);43 source. nodes.add(n2);44 source. nodes.add(n3);45 source. nodes.add(n4);42 source.addPrimitive(n1); 43 source.addPrimitive(n2); 44 source.addPrimitive(n3); 45 source.addPrimitive(n4); 46 46 source.setSelected(n1,n2); 47 47 … … 49 49 DataSet hull = builder.build(); 50 50 assertNotNull(hull); 51 assertEquals(2, hull. nodes.size());51 assertEquals(2, hull.getNodes().size()); 52 52 53 53 OsmPrimitive p = hull.getPrimitiveById(1,OsmPrimitiveType.NODE); … … 58 58 assertNull(p); 59 59 60 p = lookupByName(hull. nodes, "n2");61 assertNotNull(p); 62 63 p = lookupByName(hull. nodes, "n4");60 p = lookupByName(hull.getNodes(), "n2"); 61 assertNotNull(p); 62 63 p = lookupByName(hull.getNodes(), "n4"); 64 64 assertNull(p); 65 65 } … … 75 75 w1.addNode(n1); 76 76 w1.addNode(n2); 77 source. nodes.add(n1);78 source. nodes.add(n2);79 source. ways.add(w1);77 source.addPrimitive(n1); 78 source.addPrimitive(n2); 79 source.addPrimitive(w1); 80 80 source.setSelected(w1); 81 81 … … 83 83 DataSet hull = builder.build(); 84 84 assertNotNull(hull); 85 assertEquals(1, hull. ways.size());86 assertEquals(2, hull. nodes.size());85 assertEquals(1, hull.getWays().size()); 86 assertEquals(2, hull.getNodes().size()); 87 87 88 88 OsmPrimitive p = hull.getPrimitiveById(1,OsmPrimitiveType.NODE); … … 108 108 w1.addNode(n1); 109 109 w1.addNode(n2); 110 source. nodes.add(n1);111 source. nodes.add(n2);112 source. ways.add(w1);110 source.addPrimitive(n1); 111 source.addPrimitive(n2); 112 source.addPrimitive(w1); 113 113 source.setSelected(w1,n1,n2); 114 114 … … 116 116 DataSet hull = builder.build(); 117 117 assertNotNull(hull); 118 assertEquals(1, hull. ways.size());119 assertEquals(2, hull. nodes.size());118 assertEquals(1, hull.getWays().size()); 119 assertEquals(2, hull.getNodes().size()); 120 120 121 121 OsmPrimitive p = hull.getPrimitiveById(1,OsmPrimitiveType.NODE); … … 137 137 Way w1 = new Way(3); 138 138 w1.incomplete = true; 139 source. ways.add(w1);139 source.addPrimitive(w1); 140 140 source.setSelected(w1); 141 141 … … 143 143 DataSet hull = builder.build(); 144 144 assertNotNull(hull); 145 assertEquals(1, hull. ways.size());145 assertEquals(1, hull.getWays().size()); 146 146 147 147 OsmPrimitive p = hull.getPrimitiveById(3, OsmPrimitiveType.WAY); … … 167 167 Relation r40 = new Relation(40); 168 168 r1.addMember(new RelationMember("relation-40", r40)); 169 source. nodes.add(n20);170 source. nodes.add(n21);171 source. nodes.add(n22);172 source. ways.add(w30);173 source. relations.add(r1);174 source. relations.add(r40);169 source.addPrimitive(n20); 170 source.addPrimitive(n21); 171 source.addPrimitive(n22); 172 source.addPrimitive(w30); 173 source.addPrimitive(r1); 174 source.addPrimitive(r40); 175 175 source.setSelected(r1,n20,w30,r40); 176 176 … … 178 178 DataSet hull = builder.build(); 179 179 assertNotNull(hull); 180 assertEquals(1, hull. ways.size());181 assertEquals(3, hull. nodes.size());182 assertEquals(2, hull. relations.size());180 assertEquals(1, hull.getWays().size()); 181 assertEquals(3, hull.getNodes().size()); 182 assertEquals(2, hull.getRelations().size()); 183 183 184 184 OsmPrimitive p = hull.getPrimitiveById(1, OsmPrimitiveType.RELATION); … … 226 226 Relation r40 = new Relation(40); 227 227 r1.addMember(new RelationMember("relation-40", r40)); 228 source. nodes.add(n20);229 source. nodes.add(n21);230 source. nodes.add(n22);231 source. ways.add(w30);232 source. relations.add(r1);233 source. relations.add(r40);228 source.addPrimitive(n20); 229 source.addPrimitive(n21); 230 source.addPrimitive(n22); 231 source.addPrimitive(w30); 232 source.addPrimitive(r1); 233 source.addPrimitive(r40); 234 234 source.setSelected(r1); 235 235 … … 237 237 DataSet hull = builder.build(); 238 238 assertNotNull(hull); 239 assertEquals(1, hull. ways.size());240 assertEquals(1, hull. nodes.size());241 assertEquals(2, hull. relations.size());239 assertEquals(1, hull.getWays().size()); 240 assertEquals(1, hull.getNodes().size()); 241 assertEquals(2, hull.getRelations().size()); 242 242 243 243 OsmPrimitive p = hull.getPrimitiveById(1, OsmPrimitiveType.RELATION); … … 293 293 r1.addMember(new RelationMember("relation-40", r40)); 294 294 295 source. nodes.add(n20);296 source. nodes.add(n21);297 source. nodes.add(n22);298 source. ways.add(w30);299 source. relations.add(r1);300 source. relations.add(r40);295 source.addPrimitive(n20); 296 source.addPrimitive(n21); 297 source.addPrimitive(n22); 298 source.addPrimitive(w30); 299 source.addPrimitive(r1); 300 source.addPrimitive(r40); 301 301 source.setSelected(r1); 302 302 … … 304 304 DataSet hull = builder.build(); 305 305 assertNotNull(hull); 306 assertEquals(1, hull. ways.size());307 assertEquals(3, hull. nodes.size());308 assertEquals(2, hull. relations.size());309 310 OsmPrimitive p = lookupByName(hull. relations, "r1");306 assertEquals(1, hull.getWays().size()); 307 assertEquals(3, hull.getNodes().size()); 308 assertEquals(2, hull.getRelations().size()); 309 310 OsmPrimitive p = lookupByName(hull.getRelations(), "r1"); 311 311 assertNotNull(p); 312 312 assertEquals(p.getClass(), Relation.class); 313 313 314 Way w = (Way)lookupByName(hull. ways, "w30");314 Way w = (Way)lookupByName(hull.getWays(), "w30"); 315 315 assertNotNull(w); 316 316 assertEquals(2, w.getNodesCount()); 317 317 318 Node n = (Node)lookupByName(hull. nodes, "n21");318 Node n = (Node)lookupByName(hull.getNodes(), "n21"); 319 319 assertNotNull(n); 320 320 assertTrue(w.containsNode(n)); 321 321 322 n = (Node)lookupByName(hull. nodes, "n22");322 n = (Node)lookupByName(hull.getNodes(), "n22"); 323 323 assertNotNull(n); 324 324 assertTrue(w.containsNode(n)); 325 325 326 Relation r = (Relation)lookupByName(hull. relations, "r40");327 assertNotNull(r); 328 329 r = (Relation)lookupByName(hull. relations, "r1");326 Relation r = (Relation)lookupByName(hull.getRelations(), "r40"); 327 assertNotNull(r); 328 329 r = (Relation)lookupByName(hull.getRelations(), "r1"); 330 330 assertNotNull(r); 331 331 assertEquals(3, r.getMembersCount()); 332 RelationMember m = new RelationMember("node-20", lookupByName(hull. nodes, "n20"));332 RelationMember m = new RelationMember("node-20", lookupByName(hull.getNodes(), "n20")); 333 333 assertTrue(r.getMembers().contains(m)); 334 334 m = new RelationMember("way-30", lookupByName(hull.ways, "w30")); … … 343 343 Relation r1 = new Relation(1); 344 344 r1.addMember(new RelationMember("relation-1",r1)); 345 source. relations.add(r1);345 source.addPrimitive(r1); 346 346 source.setSelected(r1); 347 347 … … 349 349 DataSet hull = builder.build(); 350 350 assertNotNull(hull); 351 assertEquals(1, hull. relations.size());351 assertEquals(1, hull.getRelations().size()); 352 352 353 353 Relation r = (Relation)hull.getPrimitiveById(1, OsmPrimitiveType.RELATION); … … 363 363 r1.put("name", "r1"); 364 364 r1.addMember(new RelationMember("relation-1",r1)); 365 source. relations.add(r1);365 source.addPrimitive(r1); 366 366 source.setSelected(r1); 367 367 … … 369 369 DataSet hull = builder.build(); 370 370 assertNotNull(hull); 371 assertEquals(1, hull. relations.size());372 373 Relation r = (Relation)lookupByName(hull. relations, "r1");371 assertEquals(1, hull.getRelations().size()); 372 373 Relation r = (Relation)lookupByName(hull.getRelations(), "r1"); 374 374 assertNotNull(r); 375 375 assertEquals(1, r.getMembersCount()); … … 384 384 r1.addMember(new RelationMember("relation-2",r2)); 385 385 r2.addMember(new RelationMember("relation-1",r1)); 386 source. relations.add(r1);387 source. relations.add(r2);386 source.addPrimitive(r1); 387 source.addPrimitive(r2); 388 388 source.setSelected(r1,r2); 389 389 … … 391 391 DataSet hull = builder.build(); 392 392 assertNotNull(hull); 393 assertEquals(2, hull. relations.size());393 assertEquals(2, hull.getRelations().size()); 394 394 395 395 r1 = (Relation)hull.getPrimitiveById(1, OsmPrimitiveType.RELATION); -
trunk/test/unit/org/openstreetmap/josm/data/osm/visitor/MergeVisitorTest.java
r2292 r2381 8 8 9 9 import java.io.File; 10 import java.net.URLEncoder;11 10 import java.text.MessageFormat; 12 11 import java.util.Arrays; … … 358 357 Node n2 = (Node)my.getPrimitiveById(1,OsmPrimitiveType.NODE); 359 358 assertEquals(0,visitor.getConflicts().size()); 360 assertEquals(2, my.nodes.size());359 assertEquals(2, my.getNodes().size()); 361 360 assertEquals(n,n2); 362 361 } … … 402 401 visitor.merge(); 403 402 404 Node n2 = my. nodes.iterator().next();403 Node n2 = my.getNodes().iterator().next(); 405 404 assertEquals(0,visitor.getConflicts().size()); 406 405 assertEquals("value1",n2.get("key1")); … … 440 439 visitor.merge(); 441 440 442 Node n2 = my. nodes.iterator().next();441 Node n2 = my.getNodes().iterator().next(); 443 442 assertEquals(0,visitor.getConflicts().size()); 444 443 assertEquals("value1",n2.get("key1"));
Note:
See TracChangeset
for help on using the changeset viewer.