示例#1
0
        public void SqareFactorial_ArgumentException_When_Factorial_BelowZero()
        {
            // assemble
            Mathematics.MathLib target = new Mathematics.MathLib(Mathematics.MathLib.CalculationTyps.Recursive);

            // act
            target.SquareFactorial(-15);
        }
示例#2
0
        public void SqareFactorial_1_When_RecursiveFactorial_0()
        {
            // assemble
            BigInteger actual;
            BigInteger expected = 1;

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

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

            // assert
            Assert.AreEqual(expected, actual);
        }
示例#3
0
        public void SquareFactorial_518400_When_ListFactorial_6()
        {
            // assemble
            BigInteger actual;
            BigInteger expected = 518400;

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

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

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