source: josm/trunk/test/unit/org/openstreetmap/josm/command/PurgeCommandTest.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.2 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.Hash;
7import org.openstreetmap.josm.data.osm.OsmPrimitive;
8import org.openstreetmap.josm.data.osm.Storage;
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 PurgeCommand} class.
16 */
17public class PurgeCommandTest {
18
19 /**
20 * Unit test of methods {@link PurgeCommand#equals} and {@link PurgeCommand#hashCode}.
21 */
22 @Test
23 public void equalsContract() {
24 EqualsVerifier.forClass(PurgeCommand.class).usingGetClass()
25 .withPrefabValues(DataSet.class,
26 new DataSet(), new DataSet())
27 .withPrefabValues(OsmDataLayer.class,
28 new OsmDataLayer(new DataSet(), "1", null), new OsmDataLayer(new DataSet(), "2", null))
29 .withPrefabValues(Hash.class,
30 Storage.<OsmPrimitive>defaultHash(), Storage.<OsmPrimitive>defaultHash())
31 .suppress(Warning.NONFINAL_FIELDS)
32 .verify();
33 }
34}
Note: See TracBrowser for help on using the repository browser.