Changeset 2388 in josm for trunk/test


Ignore:
Timestamp:
2009-11-02T21:04:32+01:00 (10 years ago)
Author:
jttt
Message:

Replace Dataset.nodes with getNodes(), etc

Location:
trunk/test
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/functional/org/openstreetmap/josm/io/MultiFetchServerObjectReaderTest.java

    r2381 r2388  
    1515import java.text.MessageFormat;
    1616import java.util.ArrayList;
    17 import java.util.Iterator;
    1817import java.util.Properties;
    1918import java.util.logging.Level;
     
    241240    public void testMultiGet10Nodes() throws OsmTransferException {
    242241        MultiFetchServerObjectReader reader = new MultiFetchServerObjectReader();
    243         ArrayList<Node> nodes = new ArrayList<Node>(ds.nodes);
     242        ArrayList<Node> nodes = new ArrayList<Node>(ds.getNodes());
    244243        for (int i =0; i< 10; i++) {
    245244            reader.append(nodes.get(i));
     
    247246        DataSet out = reader.parseOsm(NullProgressMonitor.INSTANCE);
    248247        assertEquals(10, out.getNodes().size());
    249         Iterator<Node> it = out.nodes.iterator();
    250         while(it.hasNext()) {
    251             Node n1 = it.next();
     248        for (Node n1:out.getNodes()) {
    252249            Node n2 = (Node)ds.getPrimitiveById(n1.getId(), OsmPrimitiveType.NODE);
    253250            assertNotNull(n2);
     
    302299        DataSet out = reader.parseOsm(NullProgressMonitor.INSTANCE);
    303300        assertEquals(812, out.getNodes().size());
    304         Iterator<Node> it = out.nodes.iterator();
    305         while(it.hasNext()) {
    306             Node n1 = it.next();
     301        for (Node n1:out.getNodes()) {
    307302            Node n2 = (Node)ds.getPrimitiveById(n1.getId(), OsmPrimitiveType.NODE);
    308303            assertNotNull(n2);
  • trunk/test/unit/org/openstreetmap/josm/data/osm/visitor/MergeSourceBuildingVisitorTest.java

    r2381 r2388  
    332332        RelationMember m = new RelationMember("node-20", lookupByName(hull.getNodes(), "n20"));
    333333        assertTrue(r.getMembers().contains(m));
    334         m = new RelationMember("way-30", lookupByName(hull.ways, "w30"));
    335         assertTrue(r.getMembers().contains(m));
    336         m = new RelationMember("relation-40", lookupByName(hull.relations, "r40"));
     334        m = new RelationMember("way-30", lookupByName(hull.getWays(), "w30"));
     335        assertTrue(r.getMembers().contains(m));
     336        m = new RelationMember("relation-40", lookupByName(hull.getRelations(), "r40"));
    337337        assertTrue(r.getMembers().contains(m));
    338338    }
Note: See TracChangeset for help on using the changeset viewer.