public void Add_Multiple_Words_Get_Possible_Results() { DictionaryTree dict = new DictionaryTree(); dict.addWords(new string[] { "word", "words", "john", "joan", "art" }); CollectionAssert.AreEqual(dict.getPossibleWords("wo"), new string[] { "word", "words" }); }
public void Add_Multiple_Words_Word_Does_Not_Exist() { DictionaryTree dict = new DictionaryTree(); dict.addWords(new string[] { "word", "words", "john", "joan", "art" }); Assert.IsFalse(dict.isWord("henry")); }
public void Add_Word_Check_If_Partial_Word_Does_Not_Exist() { DictionaryTree dict = new DictionaryTree(); dict.addWords(new string[] { "word" }); Assert.IsFalse(dict.isWord("wo")); }
public void Add_Multiple_Words_Secondary_Word_Exists() { DictionaryTree dict = new DictionaryTree(); dict.addWords(new string[] { "word", "words", "john", "joan", "art" }); Assert.IsTrue(dict.isWord("words")); }
public void Add_Word_Word_Exists() { DictionaryTree dict = new DictionaryTree(); dict.addWords(new string[] { "word" }); Assert.IsTrue(dict.isWord("word")); }