public void CalculateTest(double argument, double result, double accracy) { var testingFunction = new Arccos(); var testResult = testingFunction.Calculate(argument); Assert.AreEqual(result, testResult, accracy); }
public void CalculateTest(double firstValue, double expected) { var calculator = new Arccos(); var actualResult = calculator.Calculate(firstValue); Assert.AreEqual(expected, actualResult, 0.1); }
public void Calculate() { Arccos calculator = new Arccos(); double result = calculator.Calculate(0); Assert.AreEqual(1.571, result, 0.001); }
public void CalculateTest() { IOneArgumentCalculator calculator = new Arccos(); double result = calculator.Calculate(1); Assert.AreEqual(0, result, 0.01); }
void CalcTests(double testnum) { Arccos rad = new Arccos(); double expResult = Math.Pow(testnum, 1f / 2f), actResult = rad.Calculate(testnum); Assert.AreEqual(expResult, actResult); }
public void ExceptionTest(double firstArgument) { var calculator = new Arccos(); Assert.Throws <Exception>(() => calculator.Calculate(firstArgument)); }
public void ArcTestsNegative() { var calculator = new Arccos(); var result = calculator.Calculate(-6); }
public void CalculateTestExceptionTest() { IOneArgumentCalculator calculator = new Arccos(); Assert.Throws <Exception>(() => calculator.Calculate(3)); }