public void TestBinaryTreeNodeInitializationWithoutParent() { BinaryTreeNode testNode = new BinaryTreeNode(1); Assert.AreEqual(1, testNode.value); Assert.IsNull(testNode.parentNode); Assert.IsNull(testNode.leftChild); Assert.IsNull(testNode.rightChild); Assert.IsFalse(testNode.isVisited()); }
public void TestIsVisited() { BinaryTreeNode testNode = new BinaryTreeNode(1); Assert.IsFalse(testNode.isVisited()); testNode.visit(); Assert.IsTrue(testNode.isVisited()); }