Beispiel #1
0
        public void Test_Division()
        {
            Logic.Binary_operation_factory    factory           = new Logic.Binary_operation_factory();
            Logic_Interfaces.IBinaryOperation pending_operation = factory.GetOperation("/");
            double lhs    = 6.0;
            double rhs    = 2.0;
            double result = pending_operation.PerformBinaryCalculation(lhs, rhs);

            Assert.AreEqual(3.0, result);
        }
Beispiel #2
0
 public void Test_Binary_operation_factory_Default()
 {
     Logic.Binary_operation_factory    factory           = new Logic.Binary_operation_factory();
     Logic_Interfaces.IBinaryOperation pending_operation = factory.GetOperation("whatever");
     Assert.AreEqual(null, pending_operation);
 }