Beispiel #1
0
        public void Podziel_DivideTwoNegativeNumbers_Calculated()
        {
            var    calc   = new DivideNumbers.DivideNumbers();
            double iloraz = calc.Podziel(-2, -2);

            Assert.AreEqual(1, iloraz);
        }
Beispiel #2
0
        public void Podziel_OnePositiveAndOneNegativeNumbers_Calculated()
        {
            var    calc   = new DivideNumbers.DivideNumbers();
            double iloraz = calc.Podziel(2, -2);

            Assert.AreEqual(-1, iloraz);
        }
Beispiel #3
0
        public void Podziel_DivideByZero_Exception()
        {
            var calc = new DivideNumbers.DivideNumbers();

            try
            {
                double iloraz = calc.Podziel(10, 0);
            }
            catch (DivideNumbers.DivideByZeroException expected)
            {
            }
        }