public static void MyClassInitialize(TestContext testContext) { for (int i = 0; i < COUNT; i++) { _dict.Add(i.ToString(), new TestClass()); } }
public void EqualHashDifferentKey() { KeyClass key1 = new KeyClass("a"); KeyClass key2 = new KeyClass("b"); DiskDictionary <KeyClass, int> dict = new DiskDictionary <KeyClass, int>(); dict.Add(key1, 2); dict.Add(key2, 3); Assert.IsTrue(dict[key1] == 2); Assert.IsTrue(dict[key2] == 3); Assert.IsTrue(dict.Remove(key1)); Assert.IsTrue(dict.Remove(key2)); }
public void EqualHashDifferentKey() { KeyClass key1 = new KeyClass("a"); KeyClass key2 = new KeyClass("b"); DiskDictionary<KeyClass,int> dict = new DiskDictionary<KeyClass, int>(); dict.Add(key1, 2); dict.Add(key2, 3); Assert.IsTrue( dict[key1] == 2 ); Assert.IsTrue( dict[key2] == 3 ); Assert.IsTrue(dict.Remove(key1)); Assert.IsTrue(dict.Remove(key2)); }