Changeset 12728 in josm for trunk/test/unit
- Timestamp:
- 2017-09-05T01:22:57+02:00 (7 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/actions/JoinAreasActionTest.java
r12659 r12728 63 63 MainApplication.getLayerManager().addLayer(layer); 64 64 try { 65 new JoinAreasAction( ).join(ds.getWays());65 new JoinAreasAction(false).join(ds.getWays()); 66 66 } finally { 67 67 // Ensure we clean the place before leaving, even if test fails. … … 125 125 assertTrue(test + "; expected way, but got: " + osm, osm instanceof Way); 126 126 } 127 new JoinAreasAction( ).join((Collection) primitives);127 new JoinAreasAction(false).join((Collection) primitives); 128 128 Collection<OsmPrimitive> joinedCol = dsToJoin.getPrimitives(osm -> !osm.isDeleted() && Objects.equals(osm.get("test"), test)); 129 129 assertEquals("in test " + test + ":", 1, joinedCol.size()); -
trunk/test/unit/org/openstreetmap/josm/actions/upload/FixDataHookTest.java
r12641 r12728 15 15 import org.openstreetmap.josm.command.SequenceCommand; 16 16 import org.openstreetmap.josm.data.APIDataSet; 17 import org.openstreetmap.josm.data.osm. Node;17 import org.openstreetmap.josm.data.osm.DataSet; 18 18 import org.openstreetmap.josm.data.osm.OsmPrimitive; 19 19 import org.openstreetmap.josm.data.osm.Relation; … … 46 46 assertTrue(MainApplication.undoRedo.commands.isEmpty()); 47 47 48 // Complete data set 49 Node emptyNode = new Node(); 48 // Complete data set (except empty which cannot be tested anymore) 50 49 Way emptyWay = new Way(); 51 50 Relation emptyRelation = new Relation(); … … 75 74 r2.put(" space_both ", "test"); 76 75 APIDataSet ads = new APIDataSet(); 77 ads.init( Arrays.asList(emptyNode,emptyWay, emptyRelation, w1, w2, w3, w4, w5, w6, w7, r1, r2));76 ads.init(new DataSet(emptyWay, emptyRelation, w1, w2, w3, w4, w5, w6, w7, r1, r2)); 78 77 79 78 MainApplication.undoRedo.commands.clear(); -
trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditorTest.java
r12564 r12728 90 90 @Test 91 91 public void testAddPrimitivesToRelation() { 92 assertNull(GenericRelationEditor.addPrimitivesToRelation(new Relation(1), Collections.<OsmPrimitive>emptyList())); 93 assertNull(GenericRelationEditor.addPrimitivesToRelation(new Relation(1), Collections.singleton(new Relation(1)))); 92 Relation r = new Relation(1); 93 new DataSet(r); 94 assertNull(GenericRelationEditor.addPrimitivesToRelation(r, Collections.<OsmPrimitive>emptyList())); 95 assertNull(GenericRelationEditor.addPrimitivesToRelation(r, Collections.singleton(new Relation(1)))); 94 96 95 assertNotNull(GenericRelationEditor.addPrimitivesToRelation( new Relation(1), Collections.singleton(new Node(1))));96 assertNotNull(GenericRelationEditor.addPrimitivesToRelation( new Relation(1), Collections.singleton(new Way(1))));97 assertNotNull(GenericRelationEditor.addPrimitivesToRelation( new Relation(1), Collections.singleton(new Relation(2))));97 assertNotNull(GenericRelationEditor.addPrimitivesToRelation(r, Collections.singleton(new Node(1)))); 98 assertNotNull(GenericRelationEditor.addPrimitivesToRelation(r, Collections.singleton(new Way(1)))); 99 assertNotNull(GenericRelationEditor.addPrimitivesToRelation(r, Collections.singleton(new Relation(2)))); 98 100 } 99 101
Note:
See TracChangeset
for help on using the changeset viewer.