public void TestGet() { AbstractMap <Object, Object> map = new AMT(); Assert.IsNull(map.Get("key")); Assert.IsNull(map.Get(null)); map.Put("k", "v"); map.Put("key", null); map.Put(null, "value"); Assert.AreEqual("v", map.Get("k")); Assert.IsNull(map.Get("key")); Assert.AreEqual("value", map.Get(null)); }
public void TestContainValue() { AbstractMap <Object, Object> map = new AMT(); Assert.IsFalse(map.ContainsValue("v")); Assert.IsFalse(map.ContainsValue(null)); map.Put("k", "v"); map.Put("key", null); map.Put(null, "value"); Assert.IsTrue(map.ContainsValue("v")); Assert.IsTrue(map.ContainsValue("value")); Assert.IsTrue(map.ContainsValue(null)); }