public void CalculateTest(double arOne, double arTwo, double expected) { var calculator = new Logarithm(); var actualResult = calculator.Calculate(arOne, arTwo); Assert.AreEqual(expected, actualResult, 0.001); }
public void CalculateTest(double firstValue, double expected) { var calculator = new Logarithm(); var actualResult = calculator.Calculate(firstValue); Assert.AreEqual(expected, actualResult, 0.0001); }
public void CalculateTest() { IOneArgumentCalculator calculator = new Logarithm(); double result = calculator.Calculate(1); Assert.AreEqual(0, result, 0.01); }
public void NegativeCalculateTest() { var calculator = new Logarithm(); Assert.Throws <System.Exception>(() => calculator.Calculate(-4, 1)); }
public void ExceptionLessThanZeroTest(double firstArgument) { var calculator = new Logarithm(); Assert.Throws <Exception>(() => calculator.Calculate(firstArgument)); }
public void ErrorTest() { var calculator = new Logarithm(); Assert.Throws <Exception>(() => calculator.Calculate(0)); }