public void Previous_WithNodeWithoutPreviousSibling_ShouldReturnFalseAndNotMoveCurrent() { var node = GetTagNode(); var tree = new NodeTree(node); var result = tree.Previous(); Assert.IsFalse(result); Assert.AreEqual(node, tree.Current); }
public void Previous_WithNodeThatHasPreviousSibling_ShouldReturnTrueAndMoveCurrentToCurrentsPreviousSibling() { var prev = GetTagNode(); var node = GetTagNodeWithPrevSibling(prev); var tree = new NodeTree(node); var result = tree.Previous(); Assert.IsTrue(result); Assert.AreEqual(prev, tree.Current); }