Пример #1
0
        public void UnevenFactorial_ArgumentException_When_Factorial_BelowZero()
        {
            // assemble
            Mathematics.MathLib target = new Mathematics.MathLib(Mathematics.MathLib.CalculationTyps.Recursive);

            // act
            target.UnevenFactorial(-15);
        }
Пример #2
0
        public void UnevenFactorial_1_When_RecursiveFactorial_0()
        {
            // assemble
            BigInteger actual;
            BigInteger expected = 1;

            Mathematics.MathLib target = new Mathematics.MathLib(Mathematics.MathLib.CalculationTyps.Recursive);

            // act
            actual = target.UnevenFactorial(0);

            // assert
            Assert.AreEqual(expected, actual);
        }
Пример #3
0
        public void UnevenFactorial_15_When_ListFactorial_6()
        {
            // assemble
            BigInteger actual;
            BigInteger expected = 15;

            Mathematics.MathLib target = new Mathematics.MathLib(Mathematics.MathLib.CalculationTyps.List);

            // act
            actual = target.UnevenFactorial(6);

            // assert
            Assert.AreEqual(expected, actual);
        }