Exemple #1
0
        public void CalculateFibonacci()
        {
            var helper = new CommonRecursionHelper();
            var result = helper.CalculateFibonacci(10);

            Assert.AreEqual(55, result);
        }
Exemple #2
0
        public void CreateFibonacciSeries()
        {
            var helper = new CommonRecursionHelper();
            var result = helper.CreateFibonacciSeries(10);

            Assert.AreEqual("0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55", result);
        }
Exemple #3
0
        public void FindGCD()
        {
            var helper = new CommonRecursionHelper();
            var result = helper.FindGCD(3324585, 125);

            Assert.AreEqual(5, result);
        }
Exemple #4
0
        public void ToPower()
        {
            var helper = new CommonRecursionHelper();
            var result = helper.ToPow(5, 2);

            Assert.AreEqual(25, result);
        }
Exemple #5
0
        public void ToHex()
        {
            var helper = new CommonRecursionHelper();
            var result = helper.ToHex(100);

            Assert.AreEqual("64", result);
        }
Exemple #6
0
        public void ToBinary()
        {
            var helper = new CommonRecursionHelper();
            var result = helper.ToBinary(100);

            Assert.AreEqual("1100100", result);
        }
Exemple #7
0
        public void SumDigits()
        {
            var helper = new CommonRecursionHelper();
            var result = helper.SumDigits(123456);

            Assert.AreEqual(21, result);
        }