public void BinarySearchRecursiveExceptionsTest() { var calc = new BinarySearcherRecursive(); Assert.Throws(typeof(ArgumentNullException), () => calc.BinarySearch(null, 0)); Assert.Throws(typeof(ApplicationException), () => calc.BinarySearch(new int[0], 3)); }
public int?BinarySearchRecursiveTest(int[] input, int x) { var calc = new BinarySearcherRecursive(); return(calc.BinarySearch(input, x)); }