Changeset 11392 in josm for trunk/test/unit/org


Ignore:
Timestamp:
2016-12-14T00:52:36+01:00 (7 years ago)
Author:
Don-vip
Message:

sonar - squid:S1206 - "equals(Object obj)" and "hashCode()" should be overridden in pairs (required equalsverifier 2.1.8)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/osm/StorageTest.java

    r11325 r11392  
    22package org.openstreetmap.josm.data.osm;
    33
    4 import org.junit.Ignore;
    54import org.junit.Rule;
    65import org.junit.Test;
     
    98import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    109import nl.jqno.equalsverifier.EqualsVerifier;
     10import nl.jqno.equalsverifier.Warning;
    1111
    1212/**
     
    2626     */
    2727    @Test
    28     @Ignore("not ready")
    2928    public void testEqualsContract() {
    3029        EqualsVerifier.forClass(Storage.class).usingGetClass()
    31             /*.withPrefabValues(Collection.class, new HashSet<>(Arrays.asList(1)), new HashSet<>(Arrays.asList(2)))
    32             .withPrefabValues(AbstractCollection.class, new HashSet<>(Arrays.asList(1)), new HashSet<>(Arrays.asList(2)))
    33             .withPrefabValues(Set.class, new HashSet<>(Arrays.asList(1)), new HashSet<>(Arrays.asList(2)))
    34             .withPrefabValues(AbstractSet.class, new HashSet<>(Arrays.asList(1)), new HashSet<>(Arrays.asList(2)))*/
     30            .suppress(Warning.NONFINAL_FIELDS)
     31            .withIgnoredFields("arrayCopyNecessary", "hash", "mask", "modCount", "safeIterator", "size")
    3532            .withPrefabValues(Hash.class, Storage.<Integer>defaultHash(), Storage.<Boolean>defaultHash())
    3633            .verify();
Note: See TracChangeset for help on using the changeset viewer.