Changeset 2417 in josm for trunk/test/unit


Ignore:
Timestamp:
2009-11-09T01:03:08+01:00 (10 years ago)
Author:
Gubaer
Message:

Had to update MergeVisitor as a consequence of the note in r2406 and the rework in the OSM data primitives.
Unit tests are OK but I expect a few problems in the next days.

File:
1 edited

Legend:

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

    r2396 r2417  
    553553        their.addPrimitive(n5);
    554554
    555         their.addPrimitive(n5);
    556 
    557555        Node n4 = new Node(new LatLon(2,2));
    558556        n4.setOsmId(2,2);
     
    586584     * their way has a higher version and different nodes. My way is modified.
    587585     *
    588      * => merge it onto my way not possbile, conflict
     586     * => merge onto my way not possible, create a conflict
    589587     *
    590588     */
     
    621619        Node n5 = new Node(new LatLon(1,1));
    622620        n5.setOsmId(4,1);
    623         their.addPrimitive(n5);
    624 
    625621        their.addPrimitive(n5);
    626622
     
    788784        theirWay.addNode(n3);
    789785        theirWay.addNode(n4);
    790         theirWay.setUser(User.createOsmUser(1111, "their"));
     786        User user = User.createOsmUser(1111, "their");
     787        theirWay.setUser(user);
    791788        theirWay.setTimestamp(new Date());
    792789        their.addPrimitive(theirWay);
     
    797794        assertEquals(0,visitor.getConflicts().size());
    798795        assertEquals("their", myWay.getUser().getName());
    799         assertEquals(1111, myWay.getUser().getId());
    800796        assertEquals(1111, myWay.getUser().getId());
    801797        assertEquals(theirWay.getTimestamp(), myWay.getTimestamp());
Note: See TracChangeset for help on using the changeset viewer.