public void ContainsKeyB() { PackTwoKeyDictionary ptkd = new PackTwoKeyDictionary(); TwoKeyDictionary <string, int, int> tkd = ptkd.GetLoadedTwoKeyDictionary(POPSIZE); if (!tkd.ContainsKeyB(ptkd.kbvalues[7])) { Assert.Fail(); } }
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(); }