public void FindNthRootSimpleTest8() { NumericFun numericFun = new NumericFun(); double expected = 0.545; Assert.AreEqual(expected, numericFun.FindNthRoot(0.004241979, 9, 0.00000001)); }
public void FindNthRootSimpleTest7() { NumericFun numericFun = new NumericFun(); double expected = -0.2; Assert.AreEqual(expected, numericFun.FindNthRoot(-0.008, 3, 0.1)); }
public void FindNthRootSimpleTest6() { NumericFun numericFun = new NumericFun(); double expected = 0.3; Assert.AreEqual(expected, numericFun.FindNthRoot(0.0081, 4, 0.01)); }
public void FindNthRootSimpleTest5() { NumericFun numericFun = new NumericFun(); double expected = 0.6; Assert.AreEqual(expected, numericFun.FindNthRoot(0.0279936, 7, 0.0001)); }
public void FindNthRootSimpleTest4() { NumericFun numericFun = new NumericFun(); double expected = 0.45; Assert.AreEqual(expected, numericFun.FindNthRoot(0.04100625, 4, 0.0001)); }
public void FindNthRootSimpleTest1() { NumericFun numericFun = new NumericFun(); double expected = 1; Assert.AreEqual(expected, numericFun.FindNthRoot(1, 5, 0.0001)); }
public void FindNthRootNegativeRootPowerTest() { NumericFun numericFun = new NumericFun(); Assert.Throws <ArgumentException>(() => numericFun.FindNthRoot(8, -2, 0.001), "Root power can't be equal or less than zero"); }
public void FindNthRootNegativeNumberWithOddRootTest() { NumericFun numericFun = new NumericFun(); Assert.Throws <ArgumentException>(() => numericFun.FindNthRoot(-2, 2, 0.001), "Number can't be negative with odd root power"); }
public void FindNthRootArgumentOutOfRangeTest2() { NumericFun numericFun = new NumericFun(); Assert.Throws <ArgumentOutOfRangeException>(() => numericFun.FindNthRoot(8, 15, -0.6), "Precision can't be equal or less than zero"); }