public static void AssertEquals(HashTestClass expected, HashTestClass actual) { Assert.AreEqual(expected.ElementHash.Count, actual.ElementHash.Count); foreach (object key in expected.ElementHash.Keys) { Assert.IsTrue(actual.ElementHash.ContainsKey(key)); Assert.AreEqual(expected.ElementHash[key], actual.ElementHash[key]); } }
public static HashTestClass CreateHashtableWithElements() { SortedList list = new SortedList(); list.Add("1", ElementTestClass.Create("1")); list.Add("2", ElementTestClass.Create("2")); list.Add("3", ElementTestClass.Create("3")); HashTestClass hash = new HashTestClass(); hash.ElementHash = list; return hash; }
public static HashTestClass CreateHashtableWithStrings() { SortedList list = new SortedList(); list.Add("1", "a"); list.Add("2", "b"); list.Add("3", "c"); HashTestClass hash = new HashTestClass(); hash.ElementHash = list; return hash; }
public static HashTestClass CreateHashtableWithElements() { SortedList list = new SortedList(); list.Add("1", ElementTestClass.Create("1")); list.Add("2", ElementTestClass.Create("2")); list.Add("3", ElementTestClass.Create("3")); HashTestClass hash = new HashTestClass(); hash.ElementHash = list; return(hash); }
public static HashTestClass CreateHashtableWithStrings() { SortedList list = new SortedList(); list.Add("1", "a"); list.Add("2", "b"); list.Add("3", "c"); HashTestClass hash = new HashTestClass(); hash.ElementHash = list; return(hash); }