Ignore:
Timestamp:
2017-09-05T00:03:28+02:00 (7 years ago)
Author:
Don-vip
Message:

see #13036 - forgot two unit tests

Location:
trunk/test/unit/org/openstreetmap/josm/command
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/command/DeleteCommandTest.java

    r12726 r12727  
    103103    @Test
    104104    public void testReferredDelete() {
    105         DeleteCommand.deleteWithReferences(testData.layer, Arrays.asList(testData.existingNode), true).executeCommand();
     105        DeleteCommand.deleteWithReferences(Arrays.asList(testData.existingNode), true).executeCommand();
    106106
    107107        assertTrue(testData.existingNode.isDeleted());
     
    206206
    207207    /**
    208      * Test {@link DeleteCommand#deleteWaySegment(OsmDataLayer, org.openstreetmap.josm.data.osm.WaySegment)}
     208     * Test {@link DeleteCommand#deleteWaySegment(WaySegment)}
    209209     * Way with only 1 segment
    210210     */
     
    213213        Way way1 = testData.createWay(100, testData.createNode(101), testData.createNode(102));
    214214        WaySegment ws = new WaySegment(way1, 0);
    215         Command command = DeleteCommand.deleteWaySegment(testData.layer, ws);
     215        Command command = DeleteCommand.deleteWaySegment(ws);
    216216        command.executeCommand();
    217217
     
    220220
    221221    /**
    222      * Test {@link DeleteCommand#deleteWaySegment(OsmDataLayer, org.openstreetmap.josm.data.osm.WaySegment)}
     222     * Test {@link DeleteCommand#deleteWaySegment(WaySegment)}
    223223     * Delete end of way
    224224     */
     
    228228                testData.createNode(204));
    229229        WaySegment ws = new WaySegment(way, 2);
    230         Command command = DeleteCommand.deleteWaySegment(testData.layer, ws);
     230        Command command = DeleteCommand.deleteWaySegment(ws);
    231231        command.executeCommand();
    232232
     
    238238
    239239    /**
    240      * Test {@link DeleteCommand#deleteWaySegment(OsmDataLayer, org.openstreetmap.josm.data.osm.WaySegment)}
     240     * Test {@link DeleteCommand#deleteWaySegment(WaySegment)}
    241241     * Delete start of way
    242242     */
     
    246246                testData.createNode(104));
    247247        WaySegment ws = new WaySegment(way, 0);
    248         Command command = DeleteCommand.deleteWaySegment(testData.layer, ws);
     248        Command command = DeleteCommand.deleteWaySegment(ws);
    249249        command.executeCommand();
    250250
     
    256256
    257257    /**
    258      * Test {@link DeleteCommand#deleteWaySegment(OsmDataLayer, org.openstreetmap.josm.data.osm.WaySegment)}
     258     * Test {@link DeleteCommand#deleteWaySegment(WaySegment)}
    259259     * Delete start of way
    260260     */
     
    265265        Way way = testData.createWay(100, testData.createNode(101), testData.createNode(102), node103, node104);
    266266        WaySegment ws = new WaySegment(way, 1);
    267         Command command = DeleteCommand.deleteWaySegment(testData.layer, ws);
     267        Command command = DeleteCommand.deleteWaySegment(ws);
    268268        command.executeCommand();
    269269
     
    280280
    281281    /**
    282      * Test {@link DeleteCommand#deleteWaySegment(OsmDataLayer, org.openstreetmap.josm.data.osm.WaySegment)}
     282     * Test {@link DeleteCommand#deleteWaySegment(WaySegment)}
    283283     * Delete start of way
    284284     */
     
    289289                testData.createNode(104), n);
    290290        WaySegment ws = new WaySegment(way, 2);
    291         Command command = DeleteCommand.deleteWaySegment(testData.layer, ws);
     291        Command command = DeleteCommand.deleteWaySegment(ws);
    292292        command.executeCommand();
    293293
  • trunk/test/unit/org/openstreetmap/josm/command/PurgeCommandTest.java

    r10758 r12727  
    6262        // to check that algorithm ignores it:
    6363        Relation relationParent3 = testData.createRelation(102, new RelationMember("child", testData.existingRelation));
    64         PurgeCommand command = new PurgeCommand(testData.layer,
     64        PurgeCommand command = new PurgeCommand(testData.layer.data,
    6565                Arrays.<OsmPrimitive>asList(testData.existingNode, testData.existingNode2, testData.existingWay,
    6666                        testData.existingRelation, relationParent, relationParent2),
     
    8383    @Test
    8484    public void testUndo() {
    85         PurgeCommand command = new PurgeCommand(testData.layer,
     85        PurgeCommand command = new PurgeCommand(testData.layer.data,
    8686                Arrays.<OsmPrimitive>asList(testData.existingNode, testData.existingWay),
    8787                Arrays.<OsmPrimitive>asList(testData.existingWay));
     
    107107        ArrayList<OsmPrimitive> deleted = new ArrayList<>();
    108108        ArrayList<OsmPrimitive> added = new ArrayList<>();
    109         PurgeCommand command = new PurgeCommand(testData.layer, Arrays.<OsmPrimitive>asList(testData.existingNode),
     109        PurgeCommand command = new PurgeCommand(testData.layer.data, Arrays.<OsmPrimitive>asList(testData.existingNode),
    110110                Arrays.<OsmPrimitive>asList(testData.existingRelation));
    111111        command.fillModifiedData(modified, deleted, added);
     
    121121    @Test
    122122    public void testGetParticipatingPrimitives() {
    123         PurgeCommand command = new PurgeCommand(testData.layer, Arrays.<OsmPrimitive>asList(testData.existingNode),
     123        PurgeCommand command = new PurgeCommand(testData.layer.data, Arrays.<OsmPrimitive>asList(testData.existingNode),
    124124                Arrays.<OsmPrimitive>asList(testData.existingRelation));
    125125        assertArrayEquals(new Object[] {testData.existingNode }, command.getParticipatingPrimitives().toArray());
     
    132132    public void testDescription() {
    133133        List<OsmPrimitive> shortList = Arrays.<OsmPrimitive>asList(testData.existingWay);
    134         assertTrue(new PurgeCommand(testData.layer, shortList, Arrays.<OsmPrimitive>asList()).getDescriptionText()
     134        assertTrue(new PurgeCommand(testData.layer.data, shortList, Arrays.<OsmPrimitive>asList()).getDescriptionText()
    135135                .matches("Purged 1 object"));
    136136        List<OsmPrimitive> longList = Arrays.<OsmPrimitive>asList(testData.existingNode, testData.existingNode2,
    137137                testData.existingWay);
    138         assertTrue(new PurgeCommand(testData.layer, longList, Arrays.<OsmPrimitive>asList()).getDescriptionText()
     138        assertTrue(new PurgeCommand(testData.layer.data, longList, Arrays.<OsmPrimitive>asList()).getDescriptionText()
    139139                .matches("Purged 3 objects"));
    140140    }
Note: See TracChangeset for help on using the changeset viewer.