Changeset 9225 in josm for trunk/test/unit/org/openstreetmap/josm/command
- Timestamp:
- 2015-12-31T01:38:22+01:00 (9 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm/command/conflict
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/command/conflict/ConflictAddCommandTest.java
r8917 r9225 5 5 import static org.junit.Assert.assertNotNull; 6 6 import static org.junit.Assert.assertTrue; 7 import nl.jqno.equalsverifier.EqualsVerifier; 8 import nl.jqno.equalsverifier.Warning; 7 9 8 10 import org.junit.BeforeClass; … … 13 15 import org.openstreetmap.josm.data.osm.DataSet; 14 16 import org.openstreetmap.josm.data.osm.Node; 17 import org.openstreetmap.josm.data.osm.Way; 15 18 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 16 19 … … 54 57 assertNotNull(new ConflictAddCommand(layer, conflict).getDescriptionIcon()); 55 58 } 59 60 /** 61 * Unit test of methods {@link ConflictAddCommand#equals} and {@link ConflictAddCommand#hashCode}. 62 */ 63 @Test 64 public void equalsContract() { 65 EqualsVerifier.forClass(ConflictAddCommand.class).usingGetClass() 66 .withPrefabValues(Conflict.class, 67 new Conflict<>(new Node(), new Node()), new Conflict<>(new Way(), new Way())) 68 .withPrefabValues(OsmDataLayer.class, 69 new OsmDataLayer(new DataSet(), "1", null), new OsmDataLayer(new DataSet(), "2", null)) 70 .suppress(Warning.NONFINAL_FIELDS) 71 .verify(); 72 } 56 73 } -
trunk/test/unit/org/openstreetmap/josm/command/conflict/CoordinateConflictResolveCommandTest.java
r8917 r9225 5 5 import static org.junit.Assert.assertNotNull; 6 6 import static org.junit.Assert.assertTrue; 7 import nl.jqno.equalsverifier.EqualsVerifier; 8 import nl.jqno.equalsverifier.Warning; 7 9 8 10 import org.junit.BeforeClass; … … 14 16 import org.openstreetmap.josm.data.osm.DataSet; 15 17 import org.openstreetmap.josm.data.osm.Node; 18 import org.openstreetmap.josm.data.osm.Way; 16 19 import org.openstreetmap.josm.gui.conflict.pair.MergeDecisionType; 17 20 import org.openstreetmap.josm.gui.layer.OsmDataLayer; … … 69 72 assertNotNull(new CoordinateConflictResolveCommand(conflict, null).getDescriptionIcon()); 70 73 } 74 75 /** 76 * Unit test of methods {@link CoordinateConflictResolveCommand#equals} and {@link CoordinateConflictResolveCommand#hashCode}. 77 */ 78 @Test 79 public void equalsContract() { 80 EqualsVerifier.forClass(CoordinateConflictResolveCommand.class).usingGetClass() 81 .withPrefabValues(Conflict.class, 82 new Conflict<>(new Node(), new Node()), new Conflict<>(new Way(), new Way())) 83 .withPrefabValues(OsmDataLayer.class, 84 new OsmDataLayer(new DataSet(), "1", null), new OsmDataLayer(new DataSet(), "2", null)) 85 .suppress(Warning.NONFINAL_FIELDS) 86 .verify(); 87 } 71 88 }
Note:
See TracChangeset
for help on using the changeset viewer.