예제 #1
0
        public void NewtonMethod_CorrectInputValues_PositiveTest(double number, double n, double accuracy, double ExpectedResult)
        {
            double actual   = FindNthRoot.NewtonMethod(number, n, accuracy);
            double expected = ExpectedResult;

            NUnit.Framework.Assert.AreEqual(actual, expected, accuracy);
        }
예제 #2
0
 public void Insertion_InputValuesLess0_ThrowsArgumentException(double number, double n, double accuracy)
 {
     NUnit.Framework.Assert.Throws <ArgumentException>(() => FindNthRoot.NewtonMethod(number, n, accuracy));
 }