public void CreateWordsHashTableTest() { string[] collection = { "one", "one", "two", "four", "two" }; Hashtable expectedTable = new Hashtable(); expectedTable.Add("one", 2); expectedTable.Add("two", 2); expectedTable.Add("four", 1); Hashtable resultTable = WordCounter.CreateWordsHashTable(collection); foreach (var key in expectedTable.Keys) { Assert.AreEqual(expectedTable[key], resultTable[key]); } }