public static void FindIndex_ArrayNull_ItemNull_ArgumentNullExceptionThrown(string[] sortedArray, string searchItem)
        {
            // Arranges
            var searcher = new FibonacciSearcher <string>();

            // Act
            Action action = () => searcher.FindIndex(sortedArray, searchItem);

            // Assert
            action.Should().Throw <ArgumentNullException>();
        }
        public static void FindIndex_ArrayEmpty_MinusOneReturned([Random(1, 1000, 10)] int missingItem)
        {
            // Arrange
            var searcher      = new FibonacciSearcher <int>();
            var sortedArray   = Array.Empty <int>();
            var expectedIndex = -1;

            // Act
            var actualIndex = searcher.FindIndex(sortedArray, missingItem);

            // Assert
            actualIndex.Should().Be(expectedIndex);
        }
        public static void FindIndex_ItemPresent_IndexCorrect([Random(1, 1000, 10)] int n)
        {
            // Arranges
            var searcher      = new FibonacciSearcher <int>();
            var arrayToSearch = Helper.GetSortedArray(n);
            var present       = Helper.GetItemIn(arrayToSearch);

            // Act
            var actualIndex = searcher.FindIndex(arrayToSearch, present);

            // Assert
            arrayToSearch[actualIndex].Should().Be(present);
        }
        public static void FindIndex_ItemMissing_MinusOneReturned([Random(1, 1000, 10)] int n)
        {
            // Arranges
            var searcher      = new FibonacciSearcher <int>();
            var arrayToSearch = Helper.GetSortedArray(n);
            var present       = Helper.GetItemNotIn(arrayToSearch);
            var expectedIndex = -1;

            // Act
            var actualIndex = searcher.FindIndex(arrayToSearch, present);

            // Assert
            actualIndex.Should().Be(expectedIndex);
        }