public void ContainsKeyTest() { IWDT iwdt = new IWDT(); Assert.IsFalse(iwdt.ContainsKey(HT(1, 2))); iwdt.AddOrUpdate(HT(1, 1), 2, (k, v) => { throw new AssertFailedException(); return(default(int)); }); Assert.IsTrue(iwdt.ContainsKey(HT(1, 2))); iwdt.Keys[Tuple.Create(1, 1)].IsGarbage = true; Assert.IsFalse(iwdt.ContainsKey(HT(1, 2))); iwdt.AddOrUpdate(HT(2, 1), 2, (k, v) => { throw new AssertFailedException(); return(default(int)); }); Assert.IsTrue(iwdt.ContainsKey(HT(2, 2))); Assert.IsTrue(iwdt.ContainsKey(HT(2, 2))); }