source: josm/trunk/test/unit/org/openstreetmap/josm/data/coor/CachedLatLonTest.java@ 17442

Last change on this file since 17442 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.1 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.data.coor;
3
4import java.text.DecimalFormat;
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 for class {@link CachedLatLon}.
17 */
18class CachedLatLonTest {
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 CachedLatLon#equals} and {@link CachedLatLon#hashCode}.
29 */
30 @Test
31 void testEqualsContract() {
32 TestUtils.assumeWorkingEqualsVerifier();
33 EqualsVerifier.forClass(CachedLatLon.class).usingGetClass()
34 .suppress(Warning.NONFINAL_FIELDS)
35 .withPrefabValues(DecimalFormat.class, new DecimalFormat("00.0"), new DecimalFormat("00.000"))
36 .verify();
37 }
38}
Note: See TracBrowser for help on using the repository browser.