public void TestAddition() { Calculator.models.Calculator calc = new models.Calculator(); decimal result = calc.Calculate(1.5m, 3.5m, models.CalculationType.ADDITION); Assert.Equal(5.0m, result); }
public void TestDivisonn() { Calculator.models.Calculator calc = new models.Calculator(); decimal result = calc.Calculate(5.0m, 2.0m, models.CalculationType.DIVISTION); Assert.Equal(2.5m, result); }
public void TestSubtraktion() { Calculator.models.Calculator calc = new models.Calculator(); decimal result = calc.Calculate(1.5m, 3.5m, models.CalculationType.SUBTRACTION); Assert.Equal(-2.0m, result); }
public void TestMulitpilaktion() { Calculator.models.Calculator calc = new models.Calculator(); decimal result = calc.Calculate(1.5m, 3.5m, models.CalculationType.MULTIPLICATION); Assert.Equal(5.25m, result); }
internal void DivisionByZero() { Calculator.models.Calculator calc = new models.Calculator(); calc.Calculate(5.0m, 0m, models.CalculationType.DIVISTION); }