public ParseTree(Parse theParse) { tree = new ListTree(GetTitle(theParse)); for (Parse child = Root(theParse).Parts; child != null; child = child.More) { tree.AddChild(new ParseTree(child)); } myHashCode = theParse.ToString().GetHashCode(); }
public ParseTree(Parse theParse) { tree = new ListTree(GetTitle(theParse)); for (Parse child = Root(theParse).Parts; child != null; child = child.More) { tree.AddChild(new ParseTree(child)); } myHashCode = theParse.ToString().GetHashCode(); }
public void TreeEqualsSameTreeCell() { object actual = new ListTree(string.Empty, new []{new ListTree("a")}); Parse table = Parse.ParseFrom("<table><tr><td><ul><li>a</li></ul></td></tr></table>"); Assert.IsTrue(IsEqual(table.Parts.Parts, actual)); }