Add code AbstractMultiValuedMapTest testPutAll_Map1,testPutAll_Map2 (#97)
This commit is contained in:
parent
3d7f5ba67e
commit
c4de02ddfc
|
@ -546,6 +546,14 @@ public abstract class AbstractMultiValuedMapTest<K, V> extends AbstractObjectTes
|
||||||
test.put((K) "key", (V) "object0");
|
test.put((K) "key", (V) "object0");
|
||||||
test.putAll(original);
|
test.putAll(original);
|
||||||
|
|
||||||
|
try {
|
||||||
|
final MultiValuedMap<K, V> originalNull = null;
|
||||||
|
test.putAll(originalNull);
|
||||||
|
fail("expecting NullPointerException");
|
||||||
|
} catch (final NullPointerException npe) {
|
||||||
|
// expected
|
||||||
|
}
|
||||||
|
|
||||||
assertEquals(2, test.keySet().size());
|
assertEquals(2, test.keySet().size());
|
||||||
assertEquals(4, test.size());
|
assertEquals(4, test.size());
|
||||||
assertEquals(1, test.get((K) "keyA").size());
|
assertEquals(1, test.get((K) "keyA").size());
|
||||||
|
@ -570,6 +578,14 @@ public abstract class AbstractMultiValuedMapTest<K, V> extends AbstractObjectTes
|
||||||
test.put((K) "keyX", (V) "object0");
|
test.put((K) "keyX", (V) "object0");
|
||||||
test.putAll(original);
|
test.putAll(original);
|
||||||
|
|
||||||
|
try {
|
||||||
|
final Map<K, V> originalNull = null;
|
||||||
|
test.putAll(originalNull);
|
||||||
|
fail("expecting NullPointerException");
|
||||||
|
} catch (final NullPointerException npe) {
|
||||||
|
// expected
|
||||||
|
}
|
||||||
|
|
||||||
assertEquals(3, test.keySet().size());
|
assertEquals(3, test.keySet().size());
|
||||||
assertEquals(4, test.size());
|
assertEquals(4, test.size());
|
||||||
assertEquals(1, test.get((K) "keyA").size());
|
assertEquals(1, test.get((K) "keyA").size());
|
||||||
|
|
Loading…
Reference in New Issue