public void CalculateTest(double firstArgument, double expectedResult) { var calculator = new LnCalculator(); var actualResult = calculator.Calculate(firstArgument); Assert.AreEqual(expectedResult, actualResult, 0.001); }
void CalcLogTests(double testnum) { LnCalculator logc = new LnCalculator(); double expResult = Math.Log(testnum), actResult = logc.Calculate(testnum); Assert.AreEqual(expResult, actResult); }
public void CalculateTest(double firstValue, double expected) { var calculator = new LnCalculator(); var result = calculator.Calculate(firstValue); Assert.AreEqual(expected, result, 0.0001); }
public void CalculationTest(double firstValue, double expected) { var calculator = new LnCalculator(); var actualResult = calculator.Calculate(firstValue); Assert.AreEqual(expected, actualResult, 0.1); }
public void ExceptionTest() { var calculator = new LnCalculator(); Assert.Throws <Exception>(() => calculator.Calculate(-10)); }
public void ExceptionByNegativValueTest() { var calculator = new LnCalculator(); Assert.Throws <Exception>(() => calculator.Calculate(-1)); }
public void CalculationError() { var calculator = new LnCalculator(); Assert.Throws <Exception>(() => calculator.Calculate(-3)); }