Beispiel #1
0
        public void TestOverflowExceptionForFibonacciNumber(long input)
        {
            //Arrange
            var fibonacci = new Algorithms.Fibonacci();

            //Assert
            Assert.Throws <OverflowException>(() => fibonacci.GetFibonacciNumber(input));
        }
Beispiel #2
0
        public void TestFibonacciNumber(long input, long expectedSum)
        {
            //Arrange
            var fibonacci = new Algorithms.Fibonacci();

            //Act
            var actualSum = fibonacci.GetFibonacciNumber(input);

            //Assert
            Assert.Equal(expectedSum, actualSum);
        }