Example #1
0
        public void AddTest()
        {
            Calculator calc = new Calculator();
            int number1 = 4;
            int number2 = 6;
            int expected = 10;

            int actual = calc.Add(number1, number2);

            Assert.AreEqual(expected, actual);
        }
Example #2
0
        public void MultiplyTest()
        {
            Calculator calc = new Calculator();
            int number1 = 4;
            int number2 = 6;
            int expected = 24;

            int actual = calc.Multiply(number1, number2);

            Assert.AreEqual(expected, actual);
        }
        public void MultipleTest()
        {
            // arrange
            Calculator calc = new Calculator();
            int number1 = 5;
            int number2 = 7;
            int excepted = 35;

            // act
            int actual = calc.Multiple(number1, number2);

            // assert
            Assert.AreEqual(excepted, actual);
        }
Example #4
0
        public void MultiplyTest()
        {
            //Arrange
            Calculator calc = new Calculator();
            int number1 = 5;
            int number2 = 7;
            int expected = 35;

            //Act
            int actual = calc.Multiply(number1, number2);

            //Assert
            Assert.AreEqual(expected, actual);
        }
Example #5
0
        public void MultipleTest()
        {
            //arrange
            Calculator calc = new Calculator();
            int number = 5;
            int number2 = 7;
            int expected = 35;

            //Act
            int actualy = calc.Multiple(number, number2);

            //Assert
            Assert.AreEqual(expected, actualy);
        }
        public void AddTest()
        {
            // arrange
            Calculator calc = new Calculator();
            int number1 = 5;
            int number2 = 7;
            int excepted = 12;

            // act
            int actual = calc.Add(number1, number2);

            // assert
            Assert.AreEqual(excepted, actual);
        }
Example #7
0
        public void AddTest()
        {
            //arrange
            Calculator calr = new Calculator();
            int number = 5;
            int number2 = 7;
            int expected = 12;

            //act
            int actual = calr.Add(number, number2);

            //Assert
            Assert.AreEqual(expected, actual);
        }
Example #8
0
 public void WantToTestDecimalDivision2()
 {
     var cal2 = new Calculator();
     double div = cal2.Division(4.4, 2.2);
     Assert.AreEqual(2, div);
 }
Example #9
0
 public void WantToTestDecimalSubstraction3()
 {
     Calculator calculator = new Calculator();
     double sub = calculator.Substraction(2.0, 1);
     Assert.AreEqual(1.0, sub);
 }
Example #10
0
 public void WantToTestDecimalSubstraction1()
 {
     var cal2 = new Calculator();
     double sub = cal2.Substraction(2.2, 1.1);
     Assert.AreEqual(1.1, sub);
 }
Example #11
0
 public void WantToTestDecimalMultiplication3()
 {
     var cal2 = new Calculator();
     double mul = cal2.Multiplication(3, 6.0);
     Assert.AreEqual(18.0, mul);
 }
Example #12
0
 public void WantToTestDecimalMultiplication2()
 {
     var cal2 = new Calculator();
     double mul = cal2.Multiplication(2.2, 1.2);
     Assert.AreEqual(2.64, mul);
 }
Example #13
0
 public void WantToTestDecimalMultiplication1()
 {
     var cal1 = new Calculator();
     double mul = cal1.Multiplication(2.2, 2);
     Assert.AreEqual(4.4, mul);
 }
Example #14
0
 public void WantToTestDecimalAddition3()
 {
     var cal2 = new Calculator();
     double add = cal2.Addition(2.2, 2.2);
     Assert.AreEqual(4.4, add);
 }
Example #15
0
 public void WantToTestAddFunctionality()
 {
     var cal1 = new Calculator();
     double add = cal1.Addition(2, 2);
     Assert.AreEqual(4, add);
 }
Example #16
0
 public void WantToTestSubFunctionality()
 {
     var cal1 = new Calculator();
     double sub = cal1.Substraction(2, 2);
     Assert.AreEqual(0, sub);
 }
Example #17
0
 public void WantToTestMultiplicationFunctionality()
 {
     var cal1 = new Calculator();
     double mul = cal1.Multiplication(2, 2);
     Assert.AreEqual(4, mul);
 }
Example #18
0
 public void WantToTestDivisionFunctionality()
 {
     var cal2 = new Calculator();
     double div = cal2.Division(2, 1);
     Assert.AreEqual(2, div);
 }