Changeset 1926 in josm for trunk/test


Ignore:
Timestamp:
2009-08-08T09:22:24+02:00 (15 years ago)
Author:
jttt
Message:

Replaced Relation.members with Relation.getMember() or Relation.getMembersCount()

Location:
trunk/test/unit/org/openstreetmap/josm/data/osm/visitor
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/osm/visitor/MergeSourceBuildingVisitorTest.java

    r1912 r1926  
    22package org.openstreetmap.josm.data.osm.visitor;
    33
     4import static org.junit.Assert.assertEquals;
     5import static org.junit.Assert.assertNotNull;
     6import static org.junit.Assert.assertNull;
     7import static org.junit.Assert.assertTrue;
     8
    49import java.util.Collection;
    510
    6 import org.junit.Ignore;
    711import org.junit.Test;
    812import org.openstreetmap.josm.data.coor.LatLon;
     
    1317import org.openstreetmap.josm.data.osm.RelationMember;
    1418import org.openstreetmap.josm.data.osm.Way;
    15 
    16 import static org.junit.Assert.*;
    1719
    1820public class MergeSourceBuildingVisitorTest {
     
    195197        r = (Relation)hull.getPrimitiveById(1);
    196198        assertNotNull(r);
    197         assertEquals(3, r.members.size());
     199        assertEquals(3, r.getMembersCount());
    198200        RelationMember m = new RelationMember("node-20", hull.getPrimitiveById(20));
    199201        assertTrue(r.members.contains(m));
     
    254256        r = (Relation)hull.getPrimitiveById(1);
    255257        assertNotNull(r);
    256         assertEquals(3, r.members.size());
     258        assertEquals(3, r.getMembersCount());
    257259        RelationMember m = new RelationMember("node-20", hull.getPrimitiveById(20));
    258260        assertTrue(r.members.contains(m));
     
    319321        r = (Relation)lookupByName(hull.relations, "r1");
    320322        assertNotNull(r);
    321         assertEquals(3, r.members.size());
     323        assertEquals(3, r.getMembersCount());
    322324        RelationMember m = new RelationMember("node-20", lookupByName(hull.nodes, "n20"));
    323325        assertTrue(r.members.contains(m));
     
    343345        Relation r = (Relation)hull.getPrimitiveById(1);
    344346        assertNotNull(r);
    345         assertEquals(1, r.members.size());
     347        assertEquals(1, r.getMembersCount());
    346348        assertTrue(r.members.contains(new RelationMember("relation-1",r)));
    347349    }
     
    363365        Relation r = (Relation)lookupByName(hull.relations, "r1");
    364366        assertNotNull(r);
    365         assertEquals(1, r.members.size());
     367        assertEquals(1, r.getMembersCount());
    366368        assertTrue(r.members.contains(new RelationMember("relation-1",r)));
    367369    }
     
    387389        r2 = (Relation)hull.getPrimitiveById(2);
    388390        assertNotNull(r2);
    389         assertEquals(1, r1.members.size());
     391        assertEquals(1, r1.getMembersCount());
    390392        assertTrue(r1.members.contains(new RelationMember("relation-2",r2)));
    391         assertEquals(1, r2.members.size());
     393        assertEquals(1, r2.getMembersCount());
    392394        assertTrue(r2.members.contains(new RelationMember("relation-1",r1)));
    393395    }
  • trunk/test/unit/org/openstreetmap/josm/data/osm/visitor/MergeVisitorTest.java

    r1910 r1926  
    972972
    973973        Relation r = (Relation)my.getPrimitiveById(4);
    974         assertEquals(2, r.members.size());
     974        assertEquals(2, r.getMembersCount());
    975975
    976976        Node n = (Node)my.getPrimitiveById(1);
Note: See TracChangeset for help on using the changeset viewer.