source: josm/trunk/test/unit/org/openstreetmap/josm/data/gpx/WayPointTest.java@ 12197

Last change on this file since 12197 was 12197, checked in by michael2402, 7 years ago

Fix gpx WayPointTest of equals.

  • Property svn:eol-style set to native
File size: 1.1 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.data.gpx;
3
4import java.awt.color.ColorSpace;
5
6import org.junit.Rule;
7import org.junit.Test;
8import org.openstreetmap.josm.testutils.JOSMTestRules;
9
10import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
11import nl.jqno.equalsverifier.EqualsVerifier;
12import nl.jqno.equalsverifier.Warning;
13
14/**
15 * Unit tests for class {@link WayPoint}.
16 */
17public class WayPointTest {
18
19 /**
20 * Setup test.
21 */
22 @Rule
23 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
24 public JOSMTestRules test = new JOSMTestRules();
25
26 /**
27 * Unit test of methods {@link WayPoint#equals} and {@link WayPoint#hashCode}.
28 */
29 @Test
30 public void testEqualsContract() {
31 EqualsVerifier.forClass(WayPoint.class).usingGetClass()
32 .suppress(Warning.NONFINAL_FIELDS)
33 .withIgnoredFields("customColoring", "dir", "drawLine", "east", "north", "eastNorthCacheKey")
34 .withPrefabValues(ColorSpace.class, ColorSpace.getInstance(ColorSpace.CS_sRGB), ColorSpace.getInstance(ColorSpace.CS_LINEAR_RGB))
35 .verify();
36 }
37}
Note: See TracBrowser for help on using the repository browser.