public void ShouldReturnLargerNumberGivenTwoLenghtArray(
            PeakFinding1D.AlgoType algoType)
        {
            var peakFinding1D = new PeakFinding1D(algoType);

            int?peek;

            peek = peakFinding1D.FindPeek(
                new int[] { 1, 2 });

            peek.Should().HaveValue();
            peek.Should().Be(2);

            peek = peakFinding1D.FindPeek(
                new int[] { 2, 1 });

            peek.Should().HaveValue();
            peek.Should().Be(2);
        }
        public void ShouldNotFindPeakGivenNoElements(
            PeakFinding1D.AlgoType algoType)
        {
            var peakFinding1D = new PeakFinding1D(algoType);

            var peek = peakFinding1D.FindPeek(
                new int[0]);

            peek.Should().NotHaveValue();
        }
        public void RandomTest01(
            PeakFinding1D.AlgoType algoType)
        {
            var peakFinding1D = new PeakFinding1D(algoType);

            var peek = peakFinding1D.FindPeek(
                new int[] { 1, 2, 3, 2, 1 });

            peek.Should().HaveValue();
            peek.Should().Be(3);
        }
        public void ShouldFindPeekWhenMiddleIsLargestGiven3LengthArray(
            PeakFinding1D.AlgoType algoType)
        {
            var peakFinding1D = new PeakFinding1D(algoType);

            var peek = peakFinding1D.FindPeek(
                new int[] { 1, 2, 1 });

            peek.Should().HaveValue();
            peek.Should().Be(2);
        }
        public void ShouldReturnNumberGivenTwoLengthArrayWithSameValues(
            PeakFinding1D.AlgoType algoType)
        {
            var peakFinding1D = new PeakFinding1D(algoType);

            var peek = peakFinding1D.FindPeek(
                new int[] { 2, 2 });

            peek.Should().HaveValue();
            peek.Should().Be(2);
        }
        public void ShouldReturnNumberGivenSingleItmeInArray(
            PeakFinding1D.AlgoType algoType)
        {
            var peakFinding1D = new PeakFinding1D(algoType);

            var peek = peakFinding1D.FindPeek(
                new int[] { 1 });

            peek.Should().HaveValue();
            peek.Should().Be(1);
        }
        public void RandomTest06(
            PeakFinding1D.AlgoType algoType)
        {
            var peakFinding1D = new PeakFinding1D(algoType);

            var peek = peakFinding1D.FindPeek(
                new int[] { 1, 2, 3, 4, 10, 9, 8, 7, 8, 9, 10, 4, 3, 2, 1, });

            peek.Should().HaveValue();

            var validPeeks = new int[] { 10 };

            validPeeks.Any(v => v == peek.Value).Should().BeTrue();
        }
        public void RandomTest05(
            PeakFinding1D.AlgoType algoType)
        {
            var peakFinding1D = new PeakFinding1D(algoType);

            var peek = peakFinding1D.FindPeek(
                new int[] { 1, 4, 4, 6, 7, 6, 3, 3, 1 });

            peek.Should().HaveValue();

            var validPeeks = new int[] { 4, 7, 3 };

            validPeeks.Any(v => v == peek.Value).Should().BeTrue();
        }