public void NearSearch() { // Arrange var tree = new TernaryTree(Language.Swedish); tree.Add("abcde", "abce", "abcf"); // Act var matches = tree.NearSearch("abc"); // Assert Assert.AreEqual(2, matches.Count); }
public void TestTreeNearSearchForValues() { TernaryTree <string> tree = new TernaryTree <string>(); var InputKeys = "aback abacus abalone abandon abase abash abate abbas abbe abbey abbot Abbott".ToLower().Split(' '); foreach (var key in InputKeys) { tree.Add(key, "value of " + key); } var near = tree.NearSearch("abacus", 5); int count = getCount(near); Assert.AreEqual(10, count); }
public void TestTreeNearSearchForValues() { TernaryTree<string> tree = new TernaryTree<string>(); var InputKeys = "aback abacus abalone abandon abase abash abate abbas abbe abbey abbot Abbott".ToLower().Split(' '); foreach (var key in InputKeys) { tree.Add(key, "value of " + key); } var near = tree.NearSearch("abacus", 5); int count = getCount(near); Assert.AreEqual(10, count); }