public void FibonacciLoop_NumberIs6_ShouldReturn8() { // Arrange NumbersUtility numbersUtility = new NumbersUtility(); // Act var result = numbersUtility.FibonacciLoop(6); // Assert Assert.AreEqual(8, result); }
public void FibonacciLoop_NumberIsNegative_ShouldThrowInvalidOperationException() { // Arrange NumbersUtility numbersUtility = new NumbersUtility(); // Act Action action = () => numbersUtility.FibonacciLoop(-1); // Assert Assert.ThrowsException <InvalidOperationException>(action); }