public void LastChild_WithNodeWithChildren_ShouldReturnTrueAndMoveCurrentToCurrentsLastChild() { var first = GetTagNode(); var last = GetTagNode(); var node = GetTagNodeWithChildren(first, last); var tree = new NodeTree(node); var result = tree.LastChild(); Assert.IsTrue(result); Assert.AreEqual(last, tree.Current); }
public void LastChild_WithNodeWithoutChildren_ShouldReturnFalseAndNotMoveCurrent() { var node = GetTagNode(); var tree = new NodeTree(node); var result = tree.LastChild(); Assert.IsFalse(result); Assert.AreEqual(node, tree.Current); }