コード例 #1
0
        public void WhenCall_DoFibonacciWhileFindNDigitsNumber_PassingTwoDigits_ShouldReturnValue13()
        {
            FunctionFibonacci func = new FunctionFibonacci();
            int digits             = 2;
            int n;

            var returnedValue = func.DoFibonacciWhileFindNDigitsNumber(out n, digits);

            Assert.AreEqual(13, returnedValue);
        }
コード例 #2
0
        public FibonacciReturn ShowFibonacciResult(int digits)
        {
            int n;
            var fib = functionFibonacci.DoFibonacciWhileFindNDigitsNumber(out n, digits);

            var fibonacciReturn = new FibonacciReturn()
            {
                n      = n,
                result = fib
            };

            return(fibonacciReturn);
        }