public void CalculateTest(double firstValue, double expected) { var calculator = new OneOnXCalculator(); var result = calculator.Calculate(firstValue); Assert.AreEqual(expected, result, 0.0001); }
public void DevizionByZeroTest() { IOneArgumentCalculator calculator = new OneOnXCalculator(); Assert.Throws <Exception>(() => calculator.Calculate(0)); }