public void DivideTest()
        {
            Calculator calc = new Calculator();
            int number1 = 5;
            int number2 = 7;
            int result = number1 / number2;

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

            Assert.AreEqual(result, actual);
        }
        public void MultiplyTest()
        {
            Calculator calc = new Calculator();
            int number1 = 5;
            int number2 = 7;
            int result = number1 * number2;

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

            Assert.AreEqual(result, actual);
        }
        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);
        }
Пример #4
0
        public void Person_tests_cases(double x, double y, double expected)
        {
            double actual = Calculator.Divide(x, y);

            Assert.Equal(expected, actual);
        }
Пример #5
0
 public void InValidShouldFail2()
 {
     Assert.Throws <ArgumentException>("file_name", () => Calculator.ThrowsArgumentExceptionExample());
 }
Пример #6
0
 public void InValidShouldFail()
 {
     Assert.Throws <FileNotFoundException>(() => Calculator.ThrowsExceptionExample());
 }