Esempio n. 1
0
        public void Next_WithNodeThatHasNextSibling_ShouldReturnTrueAndMoveCurrentToCurrentsNextSibling()
        {
            var next = GetTagNode();
            var node = GetTagNodeWithNextSibling(next);
            var tree = new NodeTree(node);
            var result = tree.Next();

            Assert.IsTrue(result);
            Assert.AreEqual(next, tree.Current);
        }
Esempio n. 2
0
        public void Next_WithNodeWithoutNextSibling_ShouldReturnFalseAndNotMoveCurrent()
        {
            var node = GetTagNode();
            var tree = new NodeTree(node);
            var result = tree.Next();

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