Changeset 8917 in josm for trunk/test/unit/org/openstreetmap/josm/command
- Timestamp:
- 2015-10-20T16:05:10+02:00 (9 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm/command/conflict
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/command/conflict/ConflictAddCommandTest.java
r8916 r8917 9 9 import org.junit.Test; 10 10 import org.openstreetmap.josm.JOSMFixture; 11 import org.openstreetmap.josm.Main; 11 12 import org.openstreetmap.josm.data.conflict.Conflict; 12 13 import org.openstreetmap.josm.data.osm.DataSet; … … 24 25 @BeforeClass 25 26 public static void setUpBeforeClass() { 26 JOSMFixture.createUnitTestFixture().init(); 27 JOSMFixture.createUnitTestFixture().init(true); 28 Main.map.mapView.addLayer(new OsmDataLayer(new DataSet(), null, null)); 27 29 } 28 30 … … 32 34 @Test 33 35 public void testExecuteUndoCommand() { 34 OsmDataLayer layer = new OsmDataLayer(new DataSet(), null, null);36 OsmDataLayer layer = Main.map.mapView.getEditLayer(); 35 37 Conflict<Node> conflict = new Conflict<>(new Node(), new Node()); 36 38 ConflictAddCommand cmd = new ConflictAddCommand(layer, conflict); … … 48 50 @Test 49 51 public void testGetDescriptionIcon() { 50 OsmDataLayer layer = new OsmDataLayer(new DataSet(), null, null);52 OsmDataLayer layer = Main.map.mapView.getEditLayer(); 51 53 Conflict<Node> conflict = new Conflict<>(new Node(), new Node()); 52 54 assertNotNull(new ConflictAddCommand(layer, conflict).getDescriptionIcon()); -
trunk/test/unit/org/openstreetmap/josm/command/conflict/CoordinateConflictResolveCommandTest.java
r8916 r8917 2 2 package org.openstreetmap.josm.command.conflict; 3 3 4 import static org.junit.Assert.assertEquals; 4 5 import static org.junit.Assert.assertNotNull; 5 6 import static org.junit.Assert.assertTrue; … … 42 43 CoordinateConflictResolveCommand cmd = new CoordinateConflictResolveCommand(conflict, MergeDecisionType.KEEP_MINE); 43 44 assertTrue(cmd.executeCommand()); 44 assert True(LatLon.ZERO.equals(conflict.getMy().getCoor()));45 assertEquals(LatLon.ZERO, conflict.getMy().getCoor()); 45 46 cmd.undoCommand(); 46 assert True(LatLon.ZERO.equals(conflict.getMy().getCoor()));47 assertEquals(LatLon.ZERO, conflict.getMy().getCoor()); 47 48 } 48 49 … … 55 56 CoordinateConflictResolveCommand cmd = new CoordinateConflictResolveCommand(conflict, MergeDecisionType.KEEP_THEIR); 56 57 assertTrue(cmd.executeCommand()); 57 assert True(conflict.getTheir().getCoor().equals(conflict.getMy().getCoor()));58 assertEquals(conflict.getTheir().getCoor(), conflict.getMy().getCoor()); 58 59 cmd.undoCommand(); 59 //assert True(LatLon.ZERO.equals(conflict.getMy().getCoor())); // FIXME it does not work60 //assertEquals(LatLon.ZERO, conflict.getMy().getCoor()); // FIXME it does not work 60 61 } 61 62
Note:
See TracChangeset
for help on using the changeset viewer.