public void CalculateTest(double firstValue, double expected) { var calculator = new Stepen(); var actualResult = calculator.Calculate(firstValue); Assert.AreEqual(expected, actualResult, 0.0001); }
public void StepenExceptionTest() { ICalculator stepenCalculator = new Stepen(); Assert.Throws<Exception>(() => stepenCalculator.Calculate(-1.5, -1.5)); }
public void StepenTest(double first, double two, double expected) { ICalculator stepenCalculator = new Stepen(); double result = stepenCalculator.Calculate(first, two); Assert.AreEqual(expected, result); }