public void CalculationTest(double value, double answer) { var calculator = new NaturalLog(); double actual = calculator.calculate(value); Assert.AreEqual(answer, actual, 0.001); }
public void NegativeNaturalLogTest() { var calculator = new NaturalLog(); Assert.Throws <Exception>(() => calculator.calculate(0)); }