예제 #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();
        }