示例#1
0
        public void ContainsKeyB()
        {
            PackTwoKeyDictionary ptkd = new PackTwoKeyDictionary();
            TwoKeyDictionary <string, int, int> tkd = ptkd.GetLoadedTwoKeyDictionary(POPSIZE);

            if (!tkd.ContainsKeyB(ptkd.kbvalues[7]))
            {
                Assert.Fail();
            }
        }
示例#2
0
        public void ICollection_TKeyB()
        {
            PackTwoKeyDictionary ptkd = new PackTwoKeyDictionary();
            TwoKeyDictionary <string, int, int> tkd = ptkd.GetLoadedTwoKeyDictionary(POPSIZE);

            ICollection <int> ikb = tkd.BKeys;

            Assert.AreEqual(tkd.Count, ikb.Count);

            foreach (int bkey in ikb)
            {
                if (!tkd.ContainsKeyB(bkey))
                {
                    Assert.Fail();
                }
            }

            Assert.Pass();
        }