示例#1
0
        public void WhenCall_HasNDigits_PassingANumberEqualsNDigits_ShouldReturnTrue()
        {
            FunctionFibonacci func = new FunctionFibonacci();
            int number             = 47890;
            int digits             = 5;

            var returnedValue = func.HasNDigits(number, digits);

            Assert.AreEqual(true, returnedValue);
        }
示例#2
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);
        }
示例#3
0
        public void WhenCall_HasNDigits_PassingANumberSmallerThanN_ShouldReturnFalse()
        {
            FunctionFibonacci func = new FunctionFibonacci();
            int number             = 35;
            int digits             = 5;

            var returnedValue = func.HasNDigits(number, digits);

            Assert.AreEqual(false, returnedValue);
        }
示例#4
0
 public FuncFibonacciService()
 {
     functionFibonacci = new FunctionFibonacci();
 }