public FibonacciNumber GetNext(FibonacciNumber number) { numberValidator.EnsureValid(number); return(new FibonacciNumber ( index: number.Index + 1, value: fibonacciAlgorithm.Get(number.Index - 1) + number.Value )); }
public void Get_ValidArgument(BigInteger n, BigInteger expectedResult) { var actualResult = fibonacciAlgorithm.Get(n); actualResult.Should().Be(expectedResult); }