示例#1
0
        public void ToString_WithNodeWithoutChildrenOrSiblings_ShouldReturnASimpleNode()
        {
            var node = GetTagNode();
            var tree = new NodeTree(node);

            Assert.AreEqual("<div></div>", tree.ToString());
        }
示例#2
0
        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());
        }
示例#3
0
        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());
        }