Beispiel #1
0
        public void BuildInBinarySearch_ItemNotFound(int[] input, int item)
        {
            var expected = BinarySearch.BuiltInBinarySearch(input.ToList(), item);

            Assert.AreEqual(expected, -1);
        }
Beispiel #2
0
        public void BuildInBinarySearch_GetIndexOfItem(int[] input, int item)
        {
            var expected = BinarySearch.BuiltInBinarySearch(input.ToList(), item);

            Assert.AreEqual(expected, 3);
        }