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

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

fix #16796 - Rework of GPX track colors / layer preferences (patch by Bjoeni)

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