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

            if (!tkd.ContainsKeyA(ptkd.kavalues[3]))
            {
                Assert.Fail();
            }
        }
Example #2
0
        public void IEnumerable_GetEnumerator()
        {
            PackTwoKeyDictionary ptkd = new PackTwoKeyDictionary();
            TwoKeyDictionary <string, int, int> tkd = ptkd.GetLoadedTwoKeyDictionary(POPSIZE);

            foreach (TwoKeyValueTriple <string, int, int> tkvt in tkd)
            {
                if (!tkd.ContainsKeyA(tkvt.KeyA))
                {
                    Assert.Fail();
                }
            }

            Assert.Pass();
        }
Example #3
0
        public void Add()
        {
            PackTwoKeyDictionary ptkd = new PackTwoKeyDictionary();
            TwoKeyDictionary <string, int, int> tkd = ptkd.GetLoadedTwoKeyDictionary(POPSIZE);

            foreach (string akey in tkd.AKeys)
            {
                if (!tkd.ContainsKeyA(akey))
                {
                    Assert.Fail();
                }
            }

            Assert.Pass();
        }
Example #4
0
        public void ICollection_TKeyA()
        {
            PackTwoKeyDictionary ptkd = new PackTwoKeyDictionary();
            TwoKeyDictionary <string, int, int> tkd = ptkd.GetLoadedTwoKeyDictionary(POPSIZE);

            ICollection <string> ika = tkd.AKeys;

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

            foreach (string akey in ika)
            {
                if (!tkd.ContainsKeyA(akey))
                {
                    Assert.Fail();
                }
            }

            Assert.Pass();
        }