Example #1
0
        public void NumberOfUnitsInBinaryRecord_ReturnsCorrectValue(int n, int expected)
        {
            var actual = LoopTasks.NumberOfUnitsInBinaryRecord(n);

            Assert.AreEqual(expected, actual, "NumberOfUnitsInBinaryRecord returns incorrect value.");
        }
Example #2
0
        public void SumOfFirstNFibonacciNumbers_ReturnsCorrectValue(int n, int expected)
        {
            var actual = LoopTasks.SumOfFirstNFibonacciNumbers(n);

            Assert.AreEqual(expected, actual, "SumOfFirstNFibonacciNumbers returns incorrect value.");
        }
Example #3
0
        public void SumOfOddDigits_ReturnsCorrectValue(int n, int expected)
        {
            var actual = LoopTasks.SumOfOddDigits(n);

            Assert.AreEqual(expected, actual, "SumOfOddDigits returns incorrect value.");
        }