コード例 #1
0
        public void Test_Multiplication()
        {
            Logic_Interfaces.IBinaryOperation addition = new Logic.Multiplication();
            double result = addition.Perform_binary_calculation(3.0, 2.0);

            Assert.AreEqual(6.0, result);
        }
コード例 #2
0
        public void Test_MultiplicationPositiveNegativeNumbers()
        {
            double lhs = 10.0;
            double rhs = -3.0;

            Logic_Interfaces.IBinaryOperation multiplication = new Logic.Multiplication();
            double result = multiplication.Perform_binary_calculation(lhs, rhs);

            Assert.AreEqual(-30, result);
        }
コード例 #3
0
        public void Test_MultiplicationDecimalNumbers()
        {
            double lhs = 10.2;
            double rhs = 3.6;

            Logic_Interfaces.IBinaryOperation multiplication = new Logic.Multiplication();
            double result = multiplication.Perform_binary_calculation(lhs, rhs);

            Assert.AreEqual(36.72, result, 0.00001);
        }
コード例 #4
0
        public void Test_Multiplication()
        {
            double lhs = 12.0;
            double rhs = 12.0;

            Logic_Interfaces.IBinaryOperation multiply = new Logic.Multiplication();
            double result = multiply.Perform_binary_calculation(lhs, rhs);

            Assert.AreEqual(144.0, result);
        }
コード例 #5
0
        public void Test_Multiplication()
        {
            double lhs = 3.1;
            double rhs = 2.9;

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

            Assert.AreEqual(8.99, result);
        }