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