示例#1
0
 public static void MyClassInitialize(TestContext testContext)
 {
     for (int i = 0; i < COUNT; i++)
     {
         _dict.Add(i.ToString(), new TestClass());
     }
 }
示例#2
0
        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));
        }