Esempio n. 1
0
        public void PaymentShouldGeneratePackingSlipForPhysicalProduct()
        {
            int      physicalProduct = PaymentType.PhysicalProduct.GetHashCode();
            IPayment payment         = PaymentProcessFactory.Payment(physicalProduct);
            bool     result          = payment.PaymentProcess();

            Assert.AreEqual(result, true);
        }
Esempio n. 2
0
        public void PaymentFactoryShouldGenerateFreeVideoSlip()
        {
            int      video   = PaymentType.Video.GetHashCode();
            IPayment payment = PaymentProcessFactory.Payment(video);
            bool     result  = payment.PaymentProcess();

            Assert.AreEqual(result, true);
        }
Esempio n. 3
0
        public void PaymentCreateDuplicatePackagingSlipRoyaltyDepForBook()
        {
            int      book          = PaymentType.Book.GetHashCode();
            IPayment paymentObject = PaymentProcessFactory.Payment(book);
            bool     result        = paymentObject.PaymentProcess();

            Assert.AreEqual(result, true);
        }
Esempio n. 4
0
        public void PaymentFactoryShouldUpgradeMembership()
        {
            int      membershipUpgrade = PaymentType.MembershipUpgrade.GetHashCode();
            IPayment payment           = PaymentProcessFactory.Payment(membershipUpgrade);
            bool     result            = payment.PaymentProcess();

            Assert.AreEqual(result, true);
        }
Esempio n. 5
0
        private static void OrderPaymentProcess(int PaymentType)
        {
            IPayment payment = PaymentProcessFactory.Payment(PaymentType);

            if (payment == null)
            {
                Console.WriteLine("Invalid option selected!");
            }
            else
            {
                payment.PaymentProcess();
            }
        }