source: josm/trunk/test/unit/org/openstreetmap/josm/command/TransformNodesCommandTest.java@ 10758

Last change on this file since 10758 was 10758, checked in by Don-vip, 8 years ago

sonar - squid:S3578 - Test methods should comply with a naming convention

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