예제 #1
0
        public void TestZeroDivision() // Проверка деления нуля
        {
            Calcul cc     = new Calcul();
            double a      = 0;
            double b      = 2;
            var    result = cc.Division(a, b);
            var    expect = 0;

            Assert.AreEqual(result, expect);
        }
예제 #2
0
        public void TestDivision0() // Получаем очень маленькое значение
        {
            Calcul cc     = new Calcul();
            double a      = 1;
            double b      = 999999999999999;
            var    result = cc.Division(a, b);
            var    expect = 1.000000000000001E-15;

            Assert.AreEqual(result, expect);
        }