source: josm/trunk/test/unit/org/openstreetmap/josm/data/gpx/GpxRouteTest.java@ 17360

Last change on this file since 17360 was 17275, checked in by Don-vip, 3 years ago

see #16567 - upgrade almost all tests to JUnit 5, except those depending on WiremockRule

See https://github.com/tomakehurst/wiremock/issues/684

  • Property svn:eol-style set to native
File size: 1.4 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.data.gpx;
3
4import org.junit.jupiter.api.extension.RegisterExtension;
5import org.junit.jupiter.api.Test;
6import org.openstreetmap.josm.TestUtils;
7import org.openstreetmap.josm.data.coor.LatLon;
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 GpxRoute}.
16 */
17class GpxRouteTest {
18
19 /**
20 * Setup test.
21 */
22 @RegisterExtension
23 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
24 public JOSMTestRules test = new JOSMTestRules();
25
26 /**
27 * Unit test of methods {@link GpxRoute#equals} and {@link GpxRoute#hashCode}.
28 */
29 @Test
30 void testEqualsContract() {
31 TestUtils.assumeWorkingEqualsVerifier();
32 GpxExtensionCollection col = new GpxExtensionCollection();
33 col.add("josm", "from-server", "true");
34 EqualsVerifier.forClass(GpxRoute.class).usingGetClass()
35 .suppress(Warning.NONFINAL_FIELDS)
36 .withPrefabValues(WayPoint.class, new WayPoint(LatLon.NORTH_POLE), new WayPoint(LatLon.SOUTH_POLE))
37 .withPrefabValues(GpxExtensionCollection.class, new GpxExtensionCollection(), col)
38 .verify();
39 }
40}
Note: See TracBrowser for help on using the repository browser.