mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-25 22:02:05 +01:00
Add test for MultiMap.putAll()
This commit is contained in:
parent
324302c536
commit
add1b89019
1 changed files with 20 additions and 0 deletions
|
@ -159,6 +159,26 @@ public class MultiMapTest {
|
||||||
assertTrue(map.containsKey("bingo"));
|
assertTrue(map.containsKey("bingo"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void putAll() {
|
||||||
|
MultiMap<String, String> map = new MultiMap<>();
|
||||||
|
map.put("A", "1");
|
||||||
|
map.put("A", "2");
|
||||||
|
map.put("B", "1");
|
||||||
|
|
||||||
|
MultiMap<String, String> other = new MultiMap<>();
|
||||||
|
other.put("A", "1");
|
||||||
|
other.put("B", "2");
|
||||||
|
other.put("C", "3");
|
||||||
|
|
||||||
|
map.putAll(other);
|
||||||
|
assertTrue(map.get("A").contains("1"));
|
||||||
|
assertTrue(map.get("A").contains("2"));
|
||||||
|
assertTrue(map.get("B").contains("1"));
|
||||||
|
assertTrue(map.get("B").contains("2"));
|
||||||
|
assertTrue(map.get("C").contains("3"));
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void flattenEmptyMap() {
|
public void flattenEmptyMap() {
|
||||||
MultiMap<String, String> empty = new MultiMap<>();
|
MultiMap<String, String> empty = new MultiMap<>();
|
||||||
|
|
Loading…
Reference in a new issue