public void CalculateTest(double firstValue, double expected) { var calculator = new sqrt_of_x(); var actualResult = calculator.OneArgumentOperation(firstValue); Assert.AreEqual(expected, actualResult); }
public void ErrorTest() { var calculator = new sqrt_of_x(); Assert.Throws <Exception>(() => calculator.OneArgumentOperation(-5)); }