示例#1
0
        public void SmallerThanOneException(int n)
        {
            void action() => MathR.NthPrime(n);

            Assert.ThrowsException <ArgumentOutOfRangeException>(action);
            AssertExtensions.ThrowsExceptionMessage <ArgumentOutOfRangeException>(action, "N can't be smaller than one. (Parameter 'n')");
        }
示例#2
0
 private static void AssertEquals(int n, long prime) => Assert.AreEqual(prime, MathR.NthPrime(n));
示例#3
0
 public BigInteger NthPrime() => MathR.NthPrime(N);