public void RejectNegative() { Assert.Throws <ArgumentException>(() => DecimalEx.Factorial(-1m)); }
public void RejectFractional() { Assert.Throws <ArgumentException>(() => DecimalEx.Factorial(0.5m)); }
public void Test(decimal n, decimal expected) { Assert.That(DecimalEx.Factorial(n), Is.EqualTo(expected)); }