source: josm/trunk/test/unit/org/openstreetmap/josm/data/preferences/ListSettingTest.java@ 11394

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

simplify preference settings equals handling (already performed by AbstractList.equals / AbstractMap.equals) - fixes squid:S1206 and findbugs HE_EQUALS_NO_HASHCODE warnings

  • Property svn:eol-style set to native
File size: 873 bytes
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.data.preferences;
3
4import org.junit.Rule;
5import org.junit.Test;
6import org.openstreetmap.josm.testutils.JOSMTestRules;
7
8import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
9import nl.jqno.equalsverifier.EqualsVerifier;
10
11/**
12 * Test {@link ListSetting}.
13 */
14public class ListSettingTest {
15 /**
16 * This is a preference test
17 */
18 @Rule
19 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
20 public JOSMTestRules test = new JOSMTestRules().preferences();
21
22 /**
23 * Unit test of methods {@link ListSetting#equals} and {@link ListSetting#hashCode}.
24 */
25 @Test
26 public void testEqualsContract() {
27 EqualsVerifier.forClass(ListSetting.class).usingGetClass()
28 .withIgnoredFields("isNew", "time")
29 .verify();
30 }
31}
Note: See TracBrowser for help on using the repository browser.