public void GetLongestWords01() { trie.AddWord("the longest word"); var expected = new[] { "the longest word" }; var longestWords = trie.GetLongestWords(); Assert.AreEqual(expected, longestWords); }
public void GetLongestWords01() { trie.AddWord("the longest word"); var expected = new[] { "the longest word" }; var longestWords = trie.GetLongestWords(); Assert.AreEqual(expected.Length, longestWords.Count); string longWord; IEnumerator e1 = longestWords.GetEnumerator(); e1.MoveNext(); longWord = (string)e1.Current; Assert.AreEqual(expected[0], longWord); }