public void TestAddition() { CalculatorProject.Calculator calculator = new CalculatorProject.Calculator(); decimal result = calculator.Calculate(1.5m, 3.5m, CalculatorProject.CalculationType.ADDITION); Assert.Equal(5.0m, result); }
public void TestMultiplication() { CalculatorProject.Calculator calculator = new CalculatorProject.Calculator(); decimal result = calculator.Calculate(1.5m, 3.5m, CalculatorProject.CalculationType.MULTIPLICATION); Assert.Equal(5.25m, result); }
public void TestSubtraction() { CalculatorProject.Calculator calculator = new CalculatorProject.Calculator(); decimal result = calculator.Calculate(1.5m, 3.5m, CalculatorProject.CalculationType.SUBTRACTION); Assert.Equal(-2.0m, result); }
public void TestDivision() { decimal dividend = 10.0m; decimal divisor = 2.0m; CalculatorProject.Calculator calculator = new CalculatorProject.Calculator(); decimal result = calculator.Calculate(dividend, divisor, CalculatorProject.CalculationType.DIVISION); Assert.Equal(5.0m, result); }