Пример #1
0
        public void ProgramPaymentType1()
        {
            int paymentType = 1;
            PaymentProcessing objPaymentProcessing = new PaymentProcessing();
            string            result = objPaymentProcessing.ProcessPayment(paymentType);

            Assert.Contains(result, "packing slip for Shipping");
        }
Пример #2
0
        public void ProgramValidTest()
        {
            int paymentType = 1;
            PaymentProcessing objPaymentProcessing = new PaymentProcessing();
            string            result = objPaymentProcessing.ProcessPayment(paymentType);

            Assert.IsNotNull(result);
        }
Пример #3
0
        public void ProgramPaymentType5()
        {
            int paymentType = 5;
            PaymentProcessing objPaymentProcessing = new PaymentProcessing();
            string            result = objPaymentProcessing.ProcessPayment(paymentType);

            Assert.Contains(result, "Added free First Aid video");
        }
Пример #4
0
        public void ProgramPaymentType4()
        {
            int paymentType = 4;
            PaymentProcessing objPaymentProcessing = new PaymentProcessing();
            string            result = objPaymentProcessing.ProcessPayment(paymentType);

            Assert.Contains(result, "upgraded to membership successfully");
        }
Пример #5
0
        public void ProgramPaymentType3()
        {
            int paymentType = 3;
            PaymentProcessing objPaymentProcessing = new PaymentProcessing();
            string            result = objPaymentProcessing.ProcessPayment(paymentType);

            Assert.Contains(result, "activated successfully");
        }
Пример #6
0
        public void ProgramPaymentType2()
        {
            int paymentType = 2;
            PaymentProcessing objPaymentProcessing = new PaymentProcessing();
            string            result = objPaymentProcessing.ProcessPayment(paymentType);

            Assert.Contains(result, "for Royalty");
        }
Пример #7
0
        static void Main(string[] args)
        {
            string paymentType = string.Empty;

            Console.Write("Please enter any one of the payment processing type: \n " +
                          "1: For Physical Product \n " +
                          "2: For a Book \n " +
                          "3: For Membership \n " +
                          "4: For Upgrade MemberShip \n " +
                          "5: For Video \n ");
            Console.WriteLine();
            Console.Write("Enter payment processing type: ");
            paymentType = Console.ReadLine();

            PaymentProcessing objPaymentProcessing = new PaymentProcessing();
            string            result = objPaymentProcessing.ProcessPayment(Convert.ToInt32(paymentType));

            Console.WriteLine(result);
            Console.ReadLine();
        }