public void CalculateFactorial_PositiveInteger_ReturnsFactorialOfArgument(int testIndex, int expectedResult) { var result = ClassicRecursion.CalculateFactorial(testIndex); Assert.AreEqual(expectedResult, result); }
public void CalculateFactorial_NegativeNumber_ThrowsArgumentOutOfRangeException(int outOfRangeTestIndex) { Assert.ThrowsException <ArgumentOutOfRangeException>(() => ClassicRecursion.CalculateFactorial(outOfRangeTestIndex)); }
public void GetFibonacciNumber_WhenCalled_ReturnsFibonacciNumber(int testIndex, int expectedResult) { var result = ClassicRecursion.GetFibonacciNumber(testIndex); Assert.AreEqual(expectedResult, result); }