public void CalculationAdditionTest(double firstArgument, double result) { var calculator = new ArccosCalculator(); var actualResult = calculator.Calculate(firstArgument); Assert.AreEqual(result, actualResult, 0.00001); }
public void ArccosTest() { IOneArgumentCalculator calculator = new ArccosCalculator(); Assert.Throws <Exception>(() => calculator.Calculate(2)); }
public void CalculateTest(double firstValue, double expected) { var calculator = new ArccosCalculator(); var actualResult = calculator.Calculate(firstValue); Assert.AreEqual(expected, actualResult); }
public void CalculateTests(double firstValue, double expected) { ArccosCalculator arccosCalculator = new ArccosCalculator(); double result = arccosCalculator.Calculate(firstValue); Assert.AreEqual(expected, result, 0.001); }
public void CatchExceptions(double argument) { var calculator = new ArccosCalculator(); Assert.Throws <Exception>(() => calculator.Calculate(argument)); }
public void DivisionByZeroTest() { IOneArgumentCalculator calculator = new ArccosCalculator(); Assert.Throws <Exception>(() => calculator.Calculate(14)); }
public void NegativeCalculateTests() { ArccosCalculator arccosCalculator = new ArccosCalculator(); Assert.Throws <Exception>(() => arccosCalculator.Calculate(2)); }
public void CalculationError() { var calculator = new ArccosCalculator(); Assert.Throws <Exception>(() => calculator.Calculate(5)); }