public void testEntrySet() throws Exception { Set entrySet = map.entrySet(); assertEquals(2, entrySet.size()); List entries = new ArrayList(entrySet); Map.Entry one = (Map.Entry) entries.get(0); assertEquals("foo", one.getKey()); assertEquals("baz", one.getValue()); Map.Entry two = (Map.Entry) entries.get(1); assertEquals("stay", two.getKey()); assertEquals("unchanged", two.getValue()); }
public void testGetAndGetDefault() throws Exception { assertEquals("bar", map.getDefault("foo")); assertEquals("baz", map.get("foo")); assertEquals("unchanged", map.get("stay")); }
public void testGetAndGetDefault() throws Exception { assertEquals("bar", map.getDefault("foo")); assertEquals("baz", map.get("foo")); assertEquals("unchanged", map.get("stay")); }
public void testPutAll() { Map other = new HashMap(); other.put("foo", "wiz"); other.put("new", "val"); map.putAll(other); assertEquals("wiz", map.get("foo")); assertEquals("val", map.get("new")); }
public void testPutAll() { Map other = new HashMap(); other.put("foo", "wiz"); other.put("new", "val"); map.putAll(other); assertEquals("wiz", map.get("foo")); assertEquals("val", map.get("new")); }
public void testPutAll() { Map other = new HashMap(); other.put("foo", "wiz"); other.put("new", "val"); map.putAll(other); assertEquals("wiz", map.get("foo")); assertEquals("val", map.get("new")); }
public void testPutUnchangedOriginal() { assertEquals(1, map.getChanged().size()); map.put("stay", "unchanged"); assertEquals(1, map.getChanged().size()); } }
public void testPutUnchangedOriginal() { assertEquals(1, map.getChanged().size()); map.put("stay", "unchanged"); assertEquals(1, map.getChanged().size()); } }
public void testGetChanged() throws Exception { assertEquals(1, map.getChanged().size()); assertEquals("baz", map.getChanged().get("foo")); map.put("foo", "bar"); assertFalse(map.getChanged().containsKey("foo")); }
public void testGetChanged() throws Exception { assertEquals(1, map.getChanged().size()); assertEquals("baz", map.getChanged().get("foo")); map.put("foo", "bar"); assertFalse(map.getChanged().containsKey("foo")); }
public void testGetChanged() throws Exception { assertEquals(1, map.getChanged().size()); assertEquals("baz", map.getChanged().get("foo")); map.put("foo", "bar"); assertFalse(map.getChanged().containsKey("foo")); }
public void testRemove() { assertEquals(1, map.getChanged().size()); map.remove("foo"); assertEquals(0, map.getChanged().size()); assertFalse(map.containsKey("foo")); map.put("foo", "two"); assertEquals(0, map.getChanged().size()); map.remove("foo"); assertFalse(map.containsKey("foo")); }
public void testRemove() { assertEquals(1, map.getChanged().size()); map.remove("foo"); assertEquals(0, map.getChanged().size()); assertFalse(map.containsKey("foo")); map.put("foo", "two"); assertEquals(0, map.getChanged().size()); map.remove("foo"); assertFalse(map.containsKey("foo")); }
public void testRemove() { assertEquals(1, map.getChanged().size()); map.remove("foo"); assertEquals(0, map.getChanged().size()); assertFalse(map.containsKey("foo")); map.put("foo", "two"); assertEquals(0, map.getChanged().size()); map.remove("foo"); assertFalse(map.containsKey("foo")); }
public void testClearAndIsEmpty() { assertFalse(map.isEmpty()); map.clear(); assertTrue(map.isEmpty()); assertEquals(0, map.getChanged().size()); assertEquals(0, map.size()); }
public void testClearAndIsEmpty() { assertFalse(map.isEmpty()); map.clear(); assertTrue(map.isEmpty()); assertEquals(0, map.getChanged().size()); assertEquals(0, map.size()); }
public void testClearAndIsEmpty() { assertFalse(map.isEmpty()); map.clear(); assertTrue(map.isEmpty()); assertEquals(0, map.getChanged().size()); assertEquals(0, map.size()); }
public void testValues() { Collection values = map.values(); assertEquals(2, values.size()); assertTrue(map.containsValue("baz")); assertTrue(map.containsValue("unchanged")); }
public void testValues() { Collection values = map.values(); assertEquals(2, values.size()); assertTrue(map.containsValue("baz")); assertTrue(map.containsValue("unchanged")); }
public void testValues() { Collection values = map.values(); assertEquals(2, values.size()); assertTrue(map.containsValue("baz")); assertTrue(map.containsValue("unchanged")); }