Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.1.0, 2.1.1
-
None
-
None
Description
The tests (a) DictionaryAsSetCaseInsensitiveTest and
(b) DictionaryAsSetCaseSensitiveTest have an open TODO that points to a bug in Dictionary#asStringSet()
// TODO: should it be equal??
Assertions.assertNotSame(setA.hashCode(), setB.hashCode());
To cure this, the implementation of Dictionary#asStringSet() needs override hashCode and equals properly.
After fixing the implementation, the following assertion must hold:
Assertions.assertEquals(setA, setB);
Assertions.assertEquals(setA.hashCode(), setB.hashCode());
where setA and setB are obtained via Dictionary#asStringSet().