예제 #1
0
        public void ContainsValue()
        {
            PackTwoKeyDictionary ptkd = new PackTwoKeyDictionary();
            TwoKeyDictionary <string, int, int> tkd = ptkd.GetLoadedTwoKeyDictionary(POPSIZE);

            if (!tkd.ContainsValue(ptkd.vvalues[9]))
            {
                Assert.Fail();
            }
        }
예제 #2
0
        public void ICollection_TValue()
        {
            PackTwoKeyDictionary ptkd = new PackTwoKeyDictionary();
            TwoKeyDictionary <string, int, int> tkd = ptkd.GetLoadedTwoKeyDictionary(POPSIZE);

            ICollection <int> ikb = tkd.Values;

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

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

            Assert.Pass();
        }