コード例 #1
0
        public void Test_AdditionDecimalNumbers()
        {
            double lhs = 9.3;
            double rhs = 1.9;

            Logic_Interfaces.IBinaryOperation addition = new Logic.Addition();
            double result = addition.Perform_binary_calculation(lhs, rhs);

            Assert.AreEqual(11.2, result, 0.00001);
        }
コード例 #2
0
        public void Test_AdditionWholeNumbers()
        {
            double lhs = 17.0;
            double rhs = 2.0;

            Logic_Interfaces.IBinaryOperation addition = new Logic.Addition();
            double result = addition.Perform_binary_calculation(lhs, rhs);

            Assert.AreEqual(19, result);
        }
コード例 #3
0
        public void Test_AdditionWholeNumbersWithPositiveNegativeValues()
        {
            double lhs = -17.0;
            double rhs = 4.0;

            Logic_Interfaces.IBinaryOperation addition = new Logic.Addition();
            double result = addition.Perform_binary_calculation(lhs, rhs);

            Assert.AreEqual(-13, result);
        }
コード例 #4
0
        public void Test_Addition()
        {
            double lhs = 3.1;
            double rhs = 2.9;

            Logic_Interfaces.IBinaryOperation addition = new Logic.Addition();
            double result = addition.Perform_binary_calculation(lhs, rhs);

            Assert.AreEqual(6.0, result);
        }