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