public void SuffixGroup_ReduceTest4() { SuffixGroup group = new SuffixGroup("nan$", "nana$", "naa$"); string prefix; Assert.AreEqual(new SuffixGroup("n$", "na$", "a$"), group.Reduce(out prefix)); Assert.AreEqual("na", prefix); }
public void SuffixGroup_ReduceTest2() { SuffixGroup group = new SuffixGroup("test$"); string prefix; Assert.AreEqual(group, group.Reduce(out prefix)); Assert.AreEqual("test$", prefix); }
public void SuffixGroup_BuildGroupsTest2() { SuffixGroup group = new SuffixGroup("a$", "na$", "ana$", "nana$", "anana$", "banana$"); SuffixGroup[] expected = new SuffixGroup[] { new SuffixGroup("a$", "ana$", "anana$"), new SuffixGroup("na$", "nana$"), new SuffixGroup("banana$"), }; CollectionAssertEx.AreEquivalent(expected, group.BuildGroups()); }
public static void Assert(this SuffixGroup @this, params string[] expectedSuffixes) { CollectionAssert.AreEqual(expectedSuffixes, @this.Suffixes); }
public void SuffixGroup_BuildGroupsTest1() { SuffixGroup group = new SuffixGroup("$"); CollectionAssertEx.AreEqual(group.Yield(), group.BuildGroups()); }
public void SuffixTreeBuilder_CreateRootSuffixGroupTest2() { SuffixGroup group = SuffixTreeBuilder.BuildSuffixGroup("sample$"); group.Assert("e$", "le$", "ple$", "mple$", "ample$", "sample$"); }