public void ToString_WithNodeWithoutChildrenOrSiblings_ShouldReturnASimpleNode() { var node = GetTagNode(); var tree = new NodeTree(node); Assert.AreEqual("<div></div>", tree.ToString()); }
public void ToString_WithNodeWithSiblings_ShouldReturnANodeWithSiblings() { var next = GetTagNode(); var node = GetTagNodeWithNextSibling(next); var tree = new NodeTree(node); Assert.AreEqual("<div></div><div></div>", tree.ToString()); }
public void ToString_WithNodeWithChildren_ShouldReturnANodeWithChildren() { var first = GetTagNode(); var last = GetTagNode(); var node = GetTagNodeWithChildren(first, last); var tree = new NodeTree(node); Assert.AreEqual("<div><div></div><div></div></div>", tree.ToString()); }