public void TestBSTSort() { var tree = new BinarySearchTree<int>() { 40, 11, 62, 43, 34, 16, 10, 63 }; int[] expected = new int[]{ 10, 11, 16, 34, 40, 43, 62, 63 }; var sorted = tree.Sort(); for (int i = 0; i < expected.Length; i++) { Assert.AreEqual(expected[i], sorted[i], "Checkin {0} place of tree.", i); } }