public void tree_with_one_word_should_match_when_fed_same_word() { string expected = "Hello"; IObservable<char> charStream = expected.ToObservable(); var tree = new TernarySearchTree<Char>(new List<IEnumerable<char>>(new[] {"Hello"}), charStream); tree.Subscribe(match => Assert.AreEqual(expected, match)); }
public void tree_with_one_word_should_match_when_fed_same_word() { string expected = "Hello"; IObservable <char> charStream = expected.ToObservable(); var tree = new TernarySearchTree <Char>(new List <IEnumerable <char> >(new[] { "Hello" }), charStream); tree.Subscribe(match => Assert.AreEqual(expected, match)); }
public void tree_with_several_words_should_match_any_given_word_in_the_tree() { string expected = "cute"; IObservable<char> charStream = expected.ToObservable(); var tree = new TernarySearchTree<char>(new List<IEnumerable<char>>(new[] {"as", "at", "cup", "cute", "he", "i", "us"}), charStream); tree.Subscribe(match => Assert.AreEqual(expected, match)); }
public void tree_with_several_words_should_match_any_given_word_in_the_tree() { string expected = "cute"; IObservable <char> charStream = expected.ToObservable(); var tree = new TernarySearchTree <char>(new List <IEnumerable <char> >(new[] { "as", "at", "cup", "cute", "he", "i", "us" }), charStream); tree.Subscribe(match => Assert.AreEqual(expected, match)); }