public void FindRootTest_00081and4and01_03result() { double testValue = 0; testValue = FindNthRoot.FindRoot(0.0081, 4, 0.1); Assert.AreEqual(0.3, testValue); }
public void FindRootTest_Negative0008and3and01_Negative02result() { double testValue = 0; testValue = FindNthRoot.FindRoot(-0.008, 3, 0.1); Assert.AreEqual(-0.2, testValue); }
public void FindRootTest_004100625and4and0001_045result() { double testValue = 0; testValue = FindNthRoot.FindRoot(0.04100625, 4, 0.0001); Assert.AreEqual(0.45, testValue); }
public void FindRootTest_00279936and7and0001_06result() { double testValue = 0; testValue = FindNthRoot.FindRoot(0.0279936, 7, 0.0001); Assert.AreEqual(0.6, testValue); }
public void FindRootTest_1and5and0001_1result() { double testValue = 0; testValue = FindNthRoot.FindRoot(1, 5, 0.0001); Assert.AreEqual(1, testValue); }
public void FindRootTest_8and3and0001_2result() { double testValue = 0; testValue = FindNthRoot.FindRoot(8, 3, 0.0001); Assert.AreEqual(2, testValue); }
public void FindRootTest_Negative16and4and0001_06result() { double testValue = 0; testValue = FindNthRoot.FindRoot(-16, 4, 0.0001); }
public void Test_FindRoot(double number, int powerRoot, double eps, double expected) { double actual = FindNthRoot.FindRoot(number, powerRoot, eps); Assert.AreEqual(expected, actual, eps); }
public void FindRootExceptionTest(double num, int n, double precision) { Assert.Throws <ArgumentOutOfRangeException>(() => FindNthRoot.FindRoot(num, n, precision)); }
public double FindRootTest(double num, int n, double precision) => FindNthRoot.FindRoot(num, n, precision);
public void FindRoot_NegativeAccuracy_ArgumentException(double value, double power, double accuracy) { Assert.Throws <ArgumentException>(() => FindNthRoot.FindRoot(value, power, accuracy)); }
public void FindRoot_RootedValuePowerAccuracy_NthRoot(double value, double power, double accuracy, double actual) { var myRoot = FindNthRoot.FindRoot(value, power, accuracy); Assert.AreEqual(myRoot, actual, accuracy); }