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 testContainsKey() throws Exception { assertTrue(map.containsKey("foo")); assertFalse(map.containsKey("bogus")); }
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 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 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 testContainsKey() throws Exception { assertTrue(map.containsKey("foo")); assertFalse(map.containsKey("bogus")); }
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 testValues() { Collection values = map.values(); assertEquals(2, values.size()); assertTrue(map.containsValue("baz")); assertTrue(map.containsValue("unchanged")); }
public void testClearAndIsEmpty() { assertFalse(map.isEmpty()); map.clear(); assertTrue(map.isEmpty()); assertEquals(0, map.getChanged().size()); assertEquals(0, map.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 testContainsValue() throws Exception { assertTrue(map.containsValue("baz")); assertFalse(map.containsValue("bar")); assertFalse(map.containsValue(null)); map.put("null", null); assertTrue(map.containsValue(null)); }
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 testValues() { Collection values = map.values(); assertEquals(2, values.size()); assertTrue(map.containsValue("baz")); assertTrue(map.containsValue("unchanged")); }
public void testClearAndIsEmpty() { assertFalse(map.isEmpty()); map.clear(); assertTrue(map.isEmpty()); assertEquals(0, map.getChanged().size()); assertEquals(0, map.size()); }
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 testContainsKey() throws Exception { assertTrue(map.containsKey("foo")); assertFalse(map.containsKey("bogus")); }
public void testGetAndGetDefault() throws Exception { assertEquals("bar", map.getDefault("foo")); assertEquals("baz", map.get("foo")); assertEquals("unchanged", map.get("stay")); }
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 testContainsValue() throws Exception { assertTrue(map.containsValue("baz")); assertFalse(map.containsValue("bar")); assertFalse(map.containsValue(null)); map.put("null", null); assertTrue(map.containsValue(null)); }