예제 #1
0
        public void Divide_IncorrectInputs_ShouldThrowException() // błędna wartość, dzielenie przez 0
        {
            double number1 = 10;
            double number2 = 0;

            Assert.ThrowsException <InvalidOperationException>(() => Kalkulator.Divide(number1, number2));
        }
예제 #2
0
        public void Divide_CorrectInputs_ReturnsCorrectResult() // poprawna wartość dla dzielenia
        {
            double number1 = 10;
            double number2 = 2;

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

            Assert.AreEqual(5, result);
        }