source: josm/trunk/test/unit/org/openstreetmap/josm/command/SequenceCommandTest.java@ 9504

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

new unit tests

File size: 1.0 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.command;
3
4import org.junit.Test;
5import org.openstreetmap.josm.data.osm.DataSet;
6import org.openstreetmap.josm.data.osm.Node;
7import org.openstreetmap.josm.gui.layer.OsmDataLayer;
8
9import nl.jqno.equalsverifier.EqualsVerifier;
10import nl.jqno.equalsverifier.Warning;
11
12/**
13 * Unit tests of {@link SequenceCommand} class.
14 */
15public class SequenceCommandTest {
16
17 /**
18 * Unit test of methods {@link SequenceCommand#equals} and {@link SequenceCommand#hashCode}.
19 */
20 @Test
21 public void equalsContract() {
22 EqualsVerifier.forClass(SequenceCommand.class).usingGetClass()
23 .withPrefabValues(Command.class,
24 new AddCommand(new Node(1)), new AddCommand(new Node(2)))
25 .withPrefabValues(OsmDataLayer.class,
26 new OsmDataLayer(new DataSet(), "1", null), new OsmDataLayer(new DataSet(), "2", null))
27 .suppress(Warning.NONFINAL_FIELDS)
28 .verify();
29 }
30}
Note: See TracBrowser for help on using the repository browser.