Changeset 7005 in josm for trunk/test/functional/org/openstreetmap/josm/io
- Timestamp:
- 2014-04-26T17:39:23+02:00 (11 years ago)
- Location:
- trunk/test/functional/org/openstreetmap/josm/io
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/functional/org/openstreetmap/josm/io/MultiFetchServerObjectReaderTest.java
r6995 r7005 55 55 int numRelations = 1000; 56 56 57 ArrayList<Node> nodes = new ArrayList< Node>();58 ArrayList<Way> ways = new ArrayList< Way>();57 ArrayList<Node> nodes = new ArrayList<>(); 58 ArrayList<Way> ways = new ArrayList<>(); 59 59 60 60 // create a set of nodes … … 122 122 static public void createDataSetOnServer(DataSet ds) throws OsmTransferException { 123 123 logger.info("creating data set on the server ..."); 124 ArrayList<OsmPrimitive> primitives = new ArrayList< OsmPrimitive>();124 ArrayList<OsmPrimitive> primitives = new ArrayList<>(); 125 125 primitives.addAll(testDataSet.getNodes()); 126 126 primitives.addAll(testDataSet.getWays()); … … 246 246 public void testMultiGet10Nodes() throws OsmTransferException { 247 247 MultiFetchServerObjectReader reader = new MultiFetchServerObjectReader(); 248 ArrayList<Node> nodes = new ArrayList< Node>(ds.getNodes());248 ArrayList<Node> nodes = new ArrayList<>(ds.getNodes()); 249 249 for (int i =0; i< 10; i++) { 250 250 reader.append(nodes.get(i)); … … 263 263 public void testMultiGet10Ways() throws OsmTransferException { 264 264 MultiFetchServerObjectReader reader = new MultiFetchServerObjectReader(); 265 ArrayList<Way> ways= new ArrayList< Way>(ds.getWays());265 ArrayList<Way> ways= new ArrayList<>(ds.getWays()); 266 266 for (int i =0; i< 10; i++) { 267 267 reader.append(ways.get(i)); … … 281 281 public void testMultiGet10Relations() throws OsmTransferException { 282 282 MultiFetchServerObjectReader reader = new MultiFetchServerObjectReader(); 283 ArrayList<Relation> relations= new ArrayList< Relation>(ds.getRelations());283 ArrayList<Relation> relations= new ArrayList<>(ds.getRelations()); 284 284 for (int i =0; i< 10; i++) { 285 285 reader.append(relations.get(i)); … … 299 299 public void testMultiGet800Nodes() throws OsmTransferException { 300 300 MultiFetchServerObjectReader reader = new MultiFetchServerObjectReader(); 301 ArrayList<Node> nodes = new ArrayList< Node>(ds.getNodes());301 ArrayList<Node> nodes = new ArrayList<>(ds.getNodes()); 302 302 for (int i =0; i< 812; i++) { 303 303 reader.append(nodes.get(i)); … … 316 316 public void multiGetWithNonExistingNode() throws OsmTransferException { 317 317 MultiFetchServerObjectReader reader = new MultiFetchServerObjectReader(); 318 ArrayList<Node> nodes = new ArrayList< Node>(ds.getNodes());318 ArrayList<Node> nodes = new ArrayList<>(ds.getNodes()); 319 319 for (int i =0; i< 10; i++) { 320 320 reader.append(nodes.get(i)); -
trunk/test/functional/org/openstreetmap/josm/io/OsmServerBackreferenceReaderTest.java
r6995 r7005 127 127 static public void createDataSetOnServer(DataSet ds) throws OsmTransferException { 128 128 logger.info("creating data set on the server ..."); 129 ArrayList<OsmPrimitive> primitives = new ArrayList< OsmPrimitive>();129 ArrayList<OsmPrimitive> primitives = new ArrayList<>(); 130 130 primitives.addAll(ds.getNodes()); 131 131 primitives.addAll(ds.getWays()); … … 328 328 } 329 329 assertEquals(2, referers.getRelations().size()); // two relations referring to 330 Set<Long> expectedNodeIds = new HashSet< Long>();330 Set<Long> expectedNodeIds = new HashSet<>(); 331 331 for (Way way : referers.getWays()) { 332 332 Way orig = (Way) ds.getPrimitiveById(way); … … 359 359 DataSet referers = reader.parseOsm(NullProgressMonitor.INSTANCE); 360 360 361 Set<Long> referringRelationsIds = new HashSet< Long>();361 Set<Long> referringRelationsIds = new HashSet<>(); 362 362 r = lookupRelation(referers, 6); 363 363 assertNotNull(r); … … 386 386 // ways are incomplete after reading. 387 387 // 388 Set<Long> expectedWayIds = new HashSet< Long>();388 Set<Long> expectedWayIds = new HashSet<>(); 389 389 for (RelationMember m : lookupRelation(ds, 6).getMembers()) { 390 390 if (m.isWay()) { … … 420 420 421 421 protected Set<Long> getNodeIdsInWay(Way way) { 422 HashSet<Long> ret = new HashSet< Long>();422 HashSet<Long> ret = new HashSet<>(); 423 423 if (way == null)return ret; 424 424 for (Node n: way.getNodes()) { … … 429 429 430 430 protected Set<Long> getNodeIdsInRelation(Relation r) { 431 HashSet<Long> ret = new HashSet< Long>();431 HashSet<Long> ret = new HashSet<>(); 432 432 if (r == null) return ret; 433 433 for (RelationMember m: r.getMembers()) { … … 455 455 DataSet referers = reader.parseOsm(NullProgressMonitor.INSTANCE); 456 456 457 Set<Long> referringRelationsIds = new HashSet< Long>();457 Set<Long> referringRelationsIds = new HashSet<>(); 458 458 r = lookupRelation(referers, 6); 459 459 assertNotNull(r); … … 482 482 // ways are completely read after reading the relations 483 483 // 484 Set<Long> expectedWayIds = new HashSet< Long>();484 Set<Long> expectedWayIds = new HashSet<>(); 485 485 for (RelationMember m : lookupRelation(ds, 6).getMembers()) { 486 486 if (m.isWay()) { … … 509 509 } 510 510 511 Set<Long> expectedNodeIds = new HashSet< Long>();511 Set<Long> expectedNodeIds = new HashSet<>(); 512 512 for (int i = 6; i < 10; i++) { 513 513 Relation r1 = lookupRelation(ds, i);
Note:
See TracChangeset
for help on using the changeset viewer.