Last change
on this file was 18037, checked in by Don-vip, 3 years ago |
fix #21064 - Add JUnit 5 extension for preferences (patch by taylor.smock)
|
-
Property svn:eol-style
set to
native
|
File size:
751 bytes
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.spi.preferences;
|
---|
3 |
|
---|
4 | import org.junit.jupiter.api.Test;
|
---|
5 | import org.openstreetmap.josm.TestUtils;
|
---|
6 | import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
|
---|
7 |
|
---|
8 | import nl.jqno.equalsverifier.EqualsVerifier;
|
---|
9 |
|
---|
10 | /**
|
---|
11 | * Test {@link StringSetting}.
|
---|
12 | */
|
---|
13 | // This is a preference test
|
---|
14 | @BasicPreferences
|
---|
15 | class StringSettingTest {
|
---|
16 | /**
|
---|
17 | * Unit test of methods {@link StringSetting#equals} and {@link StringSetting#hashCode}.
|
---|
18 | */
|
---|
19 | @Test
|
---|
20 | void testEqualsContract() {
|
---|
21 | TestUtils.assumeWorkingEqualsVerifier();
|
---|
22 | EqualsVerifier.forClass(StringSetting.class).usingGetClass()
|
---|
23 | .withIgnoredFields("isNew", "time")
|
---|
24 | .verify();
|
---|
25 | }
|
---|
26 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.