Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.command;
|
---|
3 |
|
---|
4 | import org.junit.BeforeClass;
|
---|
5 | import org.junit.Test;
|
---|
6 | import org.openstreetmap.josm.JOSMFixture;
|
---|
7 | import org.openstreetmap.josm.data.osm.DataSet;
|
---|
8 | import org.openstreetmap.josm.data.osm.Way;
|
---|
9 | import org.openstreetmap.josm.gui.layer.OsmDataLayer;
|
---|
10 |
|
---|
11 | import nl.jqno.equalsverifier.EqualsVerifier;
|
---|
12 | import nl.jqno.equalsverifier.Warning;
|
---|
13 |
|
---|
14 | /**
|
---|
15 | * Unit tests of {@link ChangeNodesCommand} class.
|
---|
16 | */
|
---|
17 | public class ChangeNodesCommandTest {
|
---|
18 |
|
---|
19 | /**
|
---|
20 | * Setup test.
|
---|
21 | */
|
---|
22 | @BeforeClass
|
---|
23 | public static void setUpBeforeClass() {
|
---|
24 | JOSMFixture.createUnitTestFixture().init(false);
|
---|
25 | }
|
---|
26 |
|
---|
27 | /**
|
---|
28 | * Unit test of methods {@link ChangeNodesCommand#equals} and {@link ChangeNodesCommand#hashCode}.
|
---|
29 | */
|
---|
30 | @Test
|
---|
31 | public void equalsContract() {
|
---|
32 | EqualsVerifier.forClass(ChangeNodesCommand.class).usingGetClass()
|
---|
33 | .withPrefabValues(Way.class,
|
---|
34 | new Way(1), new Way(2))
|
---|
35 | .withPrefabValues(OsmDataLayer.class,
|
---|
36 | new OsmDataLayer(new DataSet(), "1", null), new OsmDataLayer(new DataSet(), "2", null))
|
---|
37 | .suppress(Warning.NONFINAL_FIELDS)
|
---|
38 | .verify();
|
---|
39 | }
|
---|
40 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.