source: josm/trunk/test/unit/org/openstreetmap/josm/command/ChangeNodesCommandTest.java@ 9816

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

fix #12508 - add missing fixtures for command unit tests

File size: 1.2 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.osm.DataSet;
8import org.openstreetmap.josm.data.osm.Way;
9import org.openstreetmap.josm.gui.layer.OsmDataLayer;
10
11import nl.jqno.equalsverifier.EqualsVerifier;
12import nl.jqno.equalsverifier.Warning;
13
14/**
15 * Unit tests of {@link ChangeNodesCommand} class.
16 */
17public 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.