Changeset 14922 in josm for trunk/test/unit/org/openstreetmap
- Timestamp:
- 2019-03-24T14:58:24+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/osm/DataSetMergerTest.java
r14120 r14922 23 23 import org.openstreetmap.josm.data.projection.Projections; 24 24 import org.openstreetmap.josm.testutils.JOSMTestRules; 25 import org.openstreetmap.josm.tools.date.DateUtils; 25 26 26 27 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; … … 342 343 n1.setOsmId(1, 1); 343 344 n1.put("key1", "value1"); 344 Date timestamp = new Date(); 345 n1.setTimestamp(timestamp); 345 n1.setTimestamp(new Date()); 346 346 their.addPrimitive(n1); 347 347 … … 974 974 } 975 975 976 private void doTestTicket7481(DataSet source, DataSet target) { 977 // Local node A 978 Node nA = new Node(2848219691L, 1); 979 nA.setCoor(LatLon.ZERO); 980 nA.setTimestamp(DateUtils.fromString("2014-05-10T14:25:40Z")); 981 nA.setChangesetId(22251108); 982 nA.setUser(User.createOsmUser(385987, "yaho")); 983 nA.put("name", "Mionga"); 984 nA.put("tourism", "hotel"); 985 986 // Local node B, duplicated 987 Node nB = new Node(nA); 988 989 // Move and delete node A 990 nA.setCoor(new LatLon(0.1321894855, 6.64627402075)); 991 nA.setDeleted(true); 992 my.addPrimitive(nA); 993 994 // Move and modify node B 995 nB.setCoor(new LatLon(0.1322066, 6.6462202)); 996 nB.put("phone", "999"); 997 nB.setModified(true); 998 their.addPrimitive(nB); 999 1000 // Merge 1001 DataSetMerger visitor = new DataSetMerger(source, target); 1002 visitor.merge(); 1003 1004 assertEquals(1, visitor.getConflicts().size()); 1005 } 1006 1007 /** 1008 * Non-regression test 1 for <a href="https://josm.openstreetmap.de/ticket/7481">Bug #7481</a>. 1009 */ 1010 @Test 1011 public void testTicket07481ab() { 1012 doTestTicket7481(my, their); 1013 } 1014 1015 /** 1016 * Non-regression test 2 for <a href="https://josm.openstreetmap.de/ticket/7481">Bug #7481</a>. 1017 */ 1018 @Test 1019 public void testTicket07481ba() { 1020 doTestTicket7481(their, my); 1021 } 1022 976 1023 /** 977 1024 * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/12599">Bug #12599</a>. … … 1014 1061 } 1015 1062 1016 1017 1063 /** 1018 1064 * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/12616">Bug #12616</a>.
Note:
See TracChangeset
for help on using the changeset viewer.