Last change
on this file since 10945 was 10945, checked in by Don-vip, 8 years ago |
convert more unit tests to JOSMTestRules
|
-
Property svn:eol-style
set to
native
|
File size:
1.0 KB
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.data.coor;
|
---|
3 |
|
---|
4 | import java.text.DecimalFormat;
|
---|
5 |
|
---|
6 | import org.junit.Rule;
|
---|
7 | import org.junit.Test;
|
---|
8 | import org.openstreetmap.josm.testutils.JOSMTestRules;
|
---|
9 |
|
---|
10 | import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
---|
11 | import nl.jqno.equalsverifier.EqualsVerifier;
|
---|
12 | import nl.jqno.equalsverifier.Warning;
|
---|
13 |
|
---|
14 | /**
|
---|
15 | * Unit tests for class {@link CachedLatLon}.
|
---|
16 | */
|
---|
17 | public class CachedLatLonTest {
|
---|
18 |
|
---|
19 | /**
|
---|
20 | * Setup test.
|
---|
21 | */
|
---|
22 | @Rule
|
---|
23 | @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
|
---|
24 | public JOSMTestRules test = new JOSMTestRules();
|
---|
25 |
|
---|
26 | /**
|
---|
27 | * Unit test of methods {@link CachedLatLon#equals} and {@link CachedLatLon#hashCode}.
|
---|
28 | */
|
---|
29 | @Test
|
---|
30 | public void testEqualsContract() {
|
---|
31 | EqualsVerifier.forClass(CachedLatLon.class).usingGetClass()
|
---|
32 | .suppress(Warning.NONFINAL_FIELDS)
|
---|
33 | .withPrefabValues(DecimalFormat.class, new DecimalFormat("00.0"), new DecimalFormat("00.000"))
|
---|
34 | .verify();
|
---|
35 | }
|
---|
36 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.