Ignore:
Timestamp:
2017-08-27T17:07:54+02:00 (7 years ago)
Author:
Don-vip
Message:

see #15182 - move ConflictCollection from OsmDataLayer to DataSet. Simplifies some code where a data set is enough, and a layer is not needed

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

Legend:

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

    r12636 r12672  
    5959    @Test
    6060    public void testExecuteUndoCommand() {
    61         OsmDataLayer layer = MainApplication.getLayerManager().getEditLayer();
     61        DataSet ds = MainApplication.getLayerManager().getEditDataSet();
    6262        Conflict<Node> conflict = new Conflict<>(new Node(), new Node());
    63         ConflictAddCommand cmd = new ConflictAddCommand(layer, conflict);
     63        ConflictAddCommand cmd = new ConflictAddCommand(ds, conflict);
    6464        assertTrue(cmd.executeCommand());
    65         assertFalse(layer.getConflicts().isEmpty());
    66         assertTrue(layer.getConflicts().hasConflict(conflict));
     65        assertFalse(ds.getConflicts().isEmpty());
     66        assertTrue(ds.getConflicts().hasConflict(conflict));
    6767        cmd.undoCommand();
    68         assertFalse(layer.getConflicts().hasConflict(conflict));
    69         assertTrue(layer.getConflicts().isEmpty());
     68        assertFalse(ds.getConflicts().hasConflict(conflict));
     69        assertTrue(ds.getConflicts().isEmpty());
    7070    }
    7171
  • trunk/test/unit/org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDialogTest.java

    r12636 r12672  
    4747    public void testBuildDataText() {
    4848        DataSet ds = new DataSet();
    49         OsmDataLayer layer = new OsmDataLayer(ds, "", null);
    50         assertEquals("", InspectPrimitiveDialog.buildDataText(layer, new ArrayList<>(ds.allPrimitives())));
     49        assertEquals("", InspectPrimitiveDialog.buildDataText(ds, new ArrayList<>(ds.allPrimitives())));
    5150        Node n = new Node(LatLon.ZERO);
    5251        n.setOsmId(1, 1);
     
    6160                "  Coordinates: 0.0, 0.0\n" +
    6261                "  Coordinates (projected): 0.0, -7.081154551613622E-10\n" +
    63                 "\n", InspectPrimitiveDialog.buildDataText(layer, new ArrayList<>(ds.allPrimitives())));
     62                "\n", InspectPrimitiveDialog.buildDataText(ds, new ArrayList<>(ds.allPrimitives())));
    6463    }
    6564
Note: See TracChangeset for help on using the changeset viewer.