Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
        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);
 }