Exemplo n.º 1
0
        public void FibonacciRecursion_NumberIs6_ShouldReturn8()
        {
            // Arrange
            NumbersUtility numbersUtility = new NumbersUtility();

            // Act
            var result = numbersUtility.FibonacciRecursion(6);

            // Assert
            Assert.AreEqual(8, result);
        }
Exemplo n.º 2
0
        public void FibonacciRecursion_NumberIsNegative_ShouldThrowInvalidOperationException()
        {
            // Arrange
            NumbersUtility numbersUtility = new NumbersUtility();

            // Act
            Action action = () => numbersUtility.FibonacciRecursion(-1);

            // Assert
            Assert.ThrowsException <InvalidOperationException>(action);
        }