1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-12-26 12:58:02 +01:00

Add test for MultiMap.putAll()

This commit is contained in:
Paul Schaub 2023-06-05 19:44:58 +02:00
parent 324302c536
commit add1b89019
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -159,6 +159,26 @@ public class MultiMapTest {
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
public void flattenEmptyMap() {
MultiMap<String, String> empty = new MultiMap<>();