public void MultipleTermsByPrefixTest() { var searchTerms = new[] { "DAR", "TOW" }; var trie = new TrieCol(); var output = searchTerms; trie.Add(searchTerms); var result = trie.GetAllSearchTerms(); Assert.IsNotNull(result); Assert.AreEqual(output.Count(), output.Where(result.Contains).Count()); }
public void SingleCharTest() { var searchTerms = new[] { "D" }; var trie = new TrieCol(); var output = searchTerms; trie.Add(searchTerms); var result = trie.GetAllSearchTerms(); Assert.IsNotNull(result); Assert.AreEqual(output.Count(), output.Where(result.Contains).Count()); }