public void PreOrderTestTree6() { var expected = new List <int> { 10, 7, 8, 9, 15, 11, 18 }; var actual = BinaryTreeTraversePreOrder1RecursiveComplete.TraversePreOrder(BinaryTreeNodeTestData.Tree6); CollectionAssert.AreEqual(expected, actual); }
public void PreOrderTestTree14() { var expected = new List <int> { 1, 2, 4, 6, 3, 5, 7 }; var actual = BinaryTreeTraversePreOrder1RecursiveComplete.TraversePreOrder(BinaryTreeNodeTestData.Tree14); CollectionAssert.AreEqual(expected, actual); }
public void PreOrderTestTree12() { var expected = new List <int> { 15, 9, 6, 5, 7, 11, 10, 12, 23, 17, 16, 18, 25, 24, 26 }; var actual = BinaryTreeTraversePreOrder1RecursiveComplete.TraversePreOrder(BinaryTreeNodeTestData.Tree12); CollectionAssert.AreEqual(expected, actual); }
public void PreOrderTestNullTree() { var actual = BinaryTreeTraversePreOrder1RecursiveComplete.TraversePreOrder(null); Assert.AreEqual(0, actual.Count); }