Ejemplo n.º 1
0
        public void BinarySearchEvenInputsResultsinSuccess()
        {
            int[] input = new int[] {
                0, 1, 2, 8, 13, 17
            };
            int item = 13;

            var result = BinarySearchSolution.binarySearch(input, item);

            Assert.True(result);
        }
Ejemplo n.º 2
0
        public void Common_Test()
        {
            // Arrange
            var solution = new BinarySearchSolution();

            //act
            var result = solution.Search(new[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }, 8);

            //Assert
            Assert.Equal(7, result);
        }