예제 #1
0
 public void FindNthRoot_NegativeNumberAndEvenRootPower_ArgumentException()
 => Assert.Throws <ArgumentException>(() => NthRootFinder.FindNthRoot(-9.0, 2, 0.001));
예제 #2
0
 public void FindNthRoot_NegativeEpsilon_ArgumentException()
 => Assert.Throws <ArgumentOutOfRangeException>(() => NthRootFinder.FindNthRoot(9.0, 2, -0.1));
예제 #3
0
 public void FindNthRoot_NegativeRootPower_ArgumentException()
 => Assert.Throws <ArgumentOutOfRangeException>(() => NthRootFinder.FindNthRoot(9.0, -1, 0.001));
예제 #4
0
        public void IFindNthRoot_NegativeNumber(double number, long rootPower, double eps, double expected)
        {
            double result = NthRootFinder.FindNthRoot(number, rootPower, eps);

            Assert.AreEqual(expected, result, eps);
        }