Changeset 12672 in josm for trunk/test/unit/org/openstreetmap
- Timestamp:
- 2017-08-27T17:07:54+02:00 (7 years ago)
- 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 59 59 @Test 60 60 public void testExecuteUndoCommand() { 61 OsmDataLayer layer = MainApplication.getLayerManager().getEditLayer();61 DataSet ds = MainApplication.getLayerManager().getEditDataSet(); 62 62 Conflict<Node> conflict = new Conflict<>(new Node(), new Node()); 63 ConflictAddCommand cmd = new ConflictAddCommand( layer, conflict);63 ConflictAddCommand cmd = new ConflictAddCommand(ds, conflict); 64 64 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)); 67 67 cmd.undoCommand(); 68 assertFalse( layer.getConflicts().hasConflict(conflict));69 assertTrue( layer.getConflicts().isEmpty());68 assertFalse(ds.getConflicts().hasConflict(conflict)); 69 assertTrue(ds.getConflicts().isEmpty()); 70 70 } 71 71 -
trunk/test/unit/org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDialogTest.java
r12636 r12672 47 47 public void testBuildDataText() { 48 48 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()))); 51 50 Node n = new Node(LatLon.ZERO); 52 51 n.setOsmId(1, 1); … … 61 60 " Coordinates: 0.0, 0.0\n" + 62 61 " 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()))); 64 63 } 65 64
Note:
See TracChangeset
for help on using the changeset viewer.