Exemple #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')");
        }
Exemple #2
0
 private static void AssertEquals(int n, long prime) => Assert.AreEqual(prime, MathR.NthPrime(n));
Exemple #3
0
 public BigInteger NthPrime() => MathR.NthPrime(N);