Esempio n. 1
0
        public void MultiplyTest()
        {
            // arrange
            Calculator calc = new Calculator();
            int number1 = 5;
            int number2 = 7;
            int result = number1 * number2;

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

            // assert
            Assert.AreEqual(result, actual);
        }
Esempio n. 2
0
        public void DivideTest()
        {
            // arrange
            Calculator calc = new Calculator();
            int number1 = 50000;
            int number2 = 7;
            int result = number1 / number2;

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

            // assert
            Assert.AreEqual(result, actual);
        }
Esempio n. 3
0
        public void AddTest()
        {
            // arrange
            Calculator calc = new Calculator();
            int number1 = 12;
            int number2 = 643;
            int result = number1 + number2;

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

            // assert
            Assert.AreEqual(result, actual);
        }