Changeset 2471 in josm for trunk/test


Ignore:
Timestamp:
2009-11-18T18:50:38+01:00 (10 years ago)
Author:
Gubaer
Message:

fixed #3963: Synchronize does not work

File:
1 edited

Legend:

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

    r2443 r2471  
    1717import java.util.logging.Logger;
    1818
     19import org.junit.Before;
    1920import org.junit.BeforeClass;
    2021import org.junit.Test;
     
    6263    }
    6364
     65    @Before
     66    public void setUp() {
     67        User.clearUserMap();
     68    }
     69
    6470    /**
    6571     * two identical nodes, even in id and version. No confict expected.
     
    348354    /**
    349355     * their node is not visible and doesn't exist in my data set
    350      * => ignore their node
     356     * => we can't ignore it because we'd run into troubles in case of multi fetch
     357     * which can return invisible objects
    351358     *
    352359     */
     
    373380        Node n2 = (Node)my.getPrimitiveById(1,OsmPrimitiveType.NODE);
    374381        assertEquals(0,visitor.getConflicts().size());
    375         assertEquals(1, my.getNodes().size());
     382        assertEquals(2, my.getNodes().size());
    376383        assertEquals(n,n2);
    377384    }
     
    775782        theirWay.addNode(n3);
    776783        theirWay.addNode(n4);
    777         theirWay.setUser(User.createOsmUser(1111, "their"));
     784        User user = User.createOsmUser(1111, "their");
     785        theirWay.setUser(user);
    778786        theirWay.setTimestamp(new Date());
    779787        their.addPrimitive(theirWay);
     
    895903        theirWay.addNode(n4);
    896904        theirWay.addNode(n5);
    897         theirWay.setUser(User.createOsmUser(1111, "their"));
     905        User user = User.getById(1111);
     906        if (user == null) {
     907            User.createOsmUser(1111, "their");
     908        }
     909        theirWay.setUser(user);
    898910        theirWay.setTimestamp(new Date());
    899911        their.addPrimitive(theirWay);
     
    10811093        assertTrue(!w.getNode(1).incomplete);
    10821094    }
     1095
    10831096}
Note: See TracChangeset for help on using the changeset viewer.