use of org.eclipse.collections.impl.IntegerWithCast in project eclipse-collections by eclipse.
the class MapIterableTestCase method nullCollisionWithCastInEquals.
@Test
public void nullCollisionWithCastInEquals() {
if (this.newMap() instanceof SortedMap || this.newMap() instanceof ConcurrentMap) {
return;
}
MapIterable<IntegerWithCast, String> mutableMap = this.newMapWithKeysValues(new IntegerWithCast(0), "Test 2", new IntegerWithCast(0), "Test 3", null, "Test 1");
Assert.assertEquals(this.newMapWithKeysValues(new IntegerWithCast(0), "Test 3", null, "Test 1"), mutableMap);
Assert.assertEquals("Test 3", mutableMap.get(new IntegerWithCast(0)));
Assert.assertEquals("Test 1", mutableMap.get(null));
}
use of org.eclipse.collections.impl.IntegerWithCast in project eclipse-collections by eclipse.
the class ImmutableHashBiMap2Test method nullCollisionWithCastInEquals.
@Override
@Test
public void nullCollisionWithCastInEquals() {
ImmutableBiMap<IntegerWithCast, String> map = this.newMapWithKeysValues(new IntegerWithCast(0), "Test 2", null, "Test 1");
Assert.assertEquals(this.newMapWithKeysValues(new IntegerWithCast(0), "Test 2", null, "Test 1"), map);
Assert.assertEquals("Test 2", map.get(new IntegerWithCast(0)));
Assert.assertEquals("Test 1", map.get(null));
}
use of org.eclipse.collections.impl.IntegerWithCast in project eclipse-collections by eclipse.
the class ImmutableHashBiMapInverse2Test method nullCollisionWithCastInEquals.
@Override
@Test
public void nullCollisionWithCastInEquals() {
ImmutableBiMap<IntegerWithCast, String> map = this.newMapWithKeysValues(new IntegerWithCast(0), "Test 2", null, "Test 1");
Assert.assertEquals(this.newMapWithKeysValues(new IntegerWithCast(0), "Test 2", null, "Test 1"), map);
Assert.assertEquals("Test 2", map.get(new IntegerWithCast(0)));
Assert.assertEquals("Test 1", map.get(null));
}
Aggregations