public void TestingDFSPreOrder(int[] arr, int[] expected) { var binarySearchTree = new BinarySearchTree(); for (int i = 0; i < arr.Length; i++) { binarySearchTree.Insert(arr[i]); } List <int> list = new List <int>(); var depthFirstSearch = new DepthFirstSearch(); var result = depthFirstSearch.DFSPreOrder(binarySearchTree.root, list); Assert.AreEqual(expected, result); }