Example #1
0
        public void Add_AddsTwoNegativeNumbers_Calculated()
        {
            var calc = new Kalkulator();
            int sum  = calc.Add(-2, -2);

            Assert.AreEqual(-4, sum);
        }
Example #2
0
        public void Add_AddNegativeNumberToPositiveNumber_Calculated()
        {
            var calc = new Kalkulator();
            int sum  = calc.Add(-2, 3);

            Assert.AreEqual(1, sum);
        }
Example #3
0
        public void Add_AddsTwoPositiveNumbers_Calculated()
        {
            var calc = new Kalkulator();
            int sum  = calc.Add(2, 2);

            Assert.AreEqual(4, sum);
        }
Example #4
0
        public void Add_CorrectInputs_ReturnsWrongResult() // złe wartości dla dodawania
        {
            double number1 = 10;
            double number2 = 10;

            double result = Kalkulator.Add(number1, number2);

            Assert.AreNotEqual(15, result);
        }
Example #5
0
        public void Add_CorrectInputs_ReturnsCorrectResult() // poprawne wartości dla dodawania
        {
            double number1 = 10;
            double number2 = 5;

            double result = Kalkulator.Add(number1, number2);

            Assert.AreEqual(15, result);
        }