source: josm/trunk/test/unit/org/openstreetmap/josm/data/gpx/ImmutableGpxTrackTest.java@ 13079

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

see #15560 - EqualsVerifier does not work with newer Java versions -> disable tests automatically in this case
Workaround to https://github.com/jqno/equalsverifier/issues/177 / https://github.com/raphw/byte-buddy/issues/370
Inspired by https://issues.apache.org/jira/browse/SOLR-11606

  • Property svn:eol-style set to native
File size: 1.0 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 ImmutableGpxTrack}.
15 */
16public class ImmutableGpxTrackTest {
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 ImmutableGpxTrack#equals} and {@link ImmutableGpxTrack#hashCode}.
27 */
28 @Test
29 public void testEqualsContract() {
30 TestUtils.assumeWorkingEqualsVerifier();
31 EqualsVerifier.forClass(ImmutableGpxTrack.class).usingGetClass()
32 .suppress(Warning.NONFINAL_FIELDS)
33 .withIgnoredFields("bounds", "length")
34 .verify();
35 }
36}
Note: See TracBrowser for help on using the repository browser.