public void When_Payment_Is_For_Learning_To_Ski_Video_Expect_Add_Free_First_Aid_Video_To_Packing_Slip()
        {
            LearningSkiVideo learningSkiVideo = new LearningSkiVideo();

            OrderProcessing orderProcessing = new OrderProcessing(learningSkiVideo, _user);

            Assert.That(orderProcessing.ProcessOrder(), Is.True);
        }
        public void When_Payment_Is_For_Membership_Expect_Activate_The_Membership_And_Send_Email_To_Owner()
        {
            MembershipActivation membership = new MembershipActivation();

            OrderProcessing orderProcessing = new OrderProcessing(membership, _user);

            Assert.That(orderProcessing.ProcessOrder(), Is.True);
        }
        public void When_Payment_Is_To_Upgrade_Membership_Expect_Apply_The_Upgrade_And_Send_Email_To_Owner()
        {
            MembershipUpgradation membership = new MembershipUpgradation();

            OrderProcessing orderProcessing = new OrderProcessing(membership, _user);

            Assert.That(orderProcessing.ProcessOrder(), Is.True);
        }
        public void When_Payment_Is_For_Book_Expect_Generate_Packing_Slip_And_Generate_Comission_Payment_And_Create_Duplicate_Packing_Slip()
        {
            Book book = new Book();

            OrderProcessing orderProcessing = new OrderProcessing(book, _user);

            Assert.That(orderProcessing.ProcessOrder(), Is.True);
        }
        public void When_Payment_Is_For_PhysicalProduct_Expect_Generate_Packing_Slip_And_Generate_Comission_Payment()
        {
            PhysicalProduct physicalProduct = new PhysicalProduct();

            OrderProcessing orderProcessing = new OrderProcessing(physicalProduct, _user);

            Assert.That(orderProcessing.ProcessOrder(), Is.True);
        }
예제 #6
0
        public void testRuleForVideoLearningtoSki()
        {
            Order ordUpgradeMembership = new Order
            {
                OrderID   = 001,
                OrderDate = DateTime.Now,
                PType     = PaymentType.Video
            };
            OrderProcessing orderProcessingService = new OrderProcessing();

            orderProcessingService.ProcessOrder(ordUpgradeMembership);
            List <string> checkList = new List <string>()
            {
                "Add Free Aid Video To Packing Slip"
            };

            Assert.AreEqual(checkList[0], Constants.OrderStatuses[0]);
        }
예제 #7
0
        public void testRuleForUpgradeToMembership()
        {
            Order ord = new Order
            {
                OrderID   = 001,
                OrderDate = DateTime.Now,
                PType     = PaymentType.UpgradeMembership
            };
            OrderProcessing orderProcessingService = new OrderProcessing();

            orderProcessingService.ProcessOrder(ord);
            List <string> checkList = new List <string>()
            {
                "Membership Upgrade",
                "Send Activation Email to User"
            };

            Assert.AreEqual(checkList[0], Constants.OrderStatuses[0]);
            Assert.AreEqual(checkList[1], Constants.OrderStatuses[1]);
        }
예제 #8
0
        public void testRulePaymentForBook()
        {
            Order ord = new Order
            {
                OrderID   = 001,
                OrderDate = DateTime.Now,
                PType     = PaymentType.Book
            };
            OrderProcessing orderProcessingService = new OrderProcessing();

            orderProcessingService.ProcessOrder(ord);
            List <string> checkList = new List <string>()
            {
                "Generate Dulicate Packing Slip",
                "Generate Comission Payment To Agent"
            };

            Assert.AreEqual(checkList[0], Constants.OrderStatuses[0]);
            Assert.AreEqual(checkList[1], Constants.OrderStatuses[1]);
        }