source: josm/trunk/test/unit/org/openstreetmap/josm/data/gpx/GpxImageEntryTest.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

File size: 1.2 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.data.gpx;
3
4import java.io.File;
5
6import org.junit.jupiter.api.extension.RegisterExtension;
7import org.junit.jupiter.api.Test;
8import org.openstreetmap.josm.TestUtils;
9import org.openstreetmap.josm.testutils.JOSMTestRules;
10
11import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
12import nl.jqno.equalsverifier.EqualsVerifier;
13import nl.jqno.equalsverifier.Warning;
14
15/**
16 * Unit tests of {@link GpxImageEntry} class.
17 */
18class GpxImageEntryTest {
19
20 /**
21 * Setup test.
22 */
23 @RegisterExtension
24 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
25 public JOSMTestRules test = new JOSMTestRules();
26
27 /**
28 * Unit test of methods {@link GpxImageEntry#equals} and {@link GpxImageEntry#hashCode}.
29 */
30 @Test
31 void testEqualsContract() {
32 TestUtils.assumeWorkingEqualsVerifier();
33 EqualsVerifier.forClass(GpxImageEntry.class).usingGetClass()
34 .suppress(Warning.NONFINAL_FIELDS)
35 .withPrefabValues(GpxImageEntry.class, new GpxImageEntry(new File("foo")), new GpxImageEntry(new File("bar")))
36 .verify();
37 }
38}
Note: See TracBrowser for help on using the repository browser.