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); }
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); }