Exemplo n.º 1
0
        public void Parent_WithNodeWithParent_ShouldReturnTrueAndMoveCurrentToCurrentsParent()
        {
            var parent = GetTagNode();
            var node = GetTagNodeWithParent(parent);
            var tree = new NodeTree(node);
            var result = tree.Parent();

            Assert.IsTrue(result);
            Assert.AreEqual(parent, tree.Current);
        }
Exemplo n.º 2
0
        public void Parent_WithNodeWithoutParent_ShouldReturnFalseAndNotMoveCurrent()
        {
            var node = GetTagNode();
            var tree = new NodeTree(node);
            var result = tree.Parent();

            Assert.IsFalse(result);
            Assert.AreEqual(node, tree.Current);
        }