public void TestFactorialBigIntegerEqualsFactorialInt() { for (int n = 0; n < 10; n++) { // act int factorial0 = BigIntegerMathLib.Factorial0(n); BigInteger factorial1 = BigIntegerMathLib.Factorial1(n); // assert Assert.AreEqual((BigInteger)factorial0, factorial1); Assert.AreEqual(factorial0, (int)factorial1); } }
public void TestFactorial0OfNegativeNumberThrowsArgumentException() { // assert Assert.That(() => BigIntegerMathLib.Factorial0(-1), Throws.TypeOf <ArgumentException>()); }