public void TryAddTest() { IWDT iwdt = new IWDT(); Assert.IsTrue(iwdt.TryAdd(HT(1, 1), 4)); Assert.AreEqual(4, iwdt.GetItem(HT(1, 2))); Assert.IsFalse(iwdt.TryAdd(HT(1, 3), 8)); iwdt.Keys[Tuple.Create(1, 1)].IsGarbage = true; Assert.IsTrue(iwdt.TryAdd(HT(1, 3), 8)); Assert.AreEqual(8, iwdt.GetItem(HT(1, 2))); }