static void Main(string[] args)
        {
            OrderProcessFactory orderProcess = new ConcreteOrderProcessFactory();
            int flag = -1;

            Console.WriteLine("Enter the request you want to process. Following is the list of request:");
            do
            {
                Console.WriteLine("\nActivate membership");
                Console.WriteLine("Book");
                Console.WriteLine("Email Owner");
                Console.WriteLine("Physical Product");
                Console.WriteLine("Upgrade To Membership");
                Console.WriteLine("Video\n");

                var type = Console.ReadLine();

                var paymetRequest = orderProcess.GetOrderProcessType(type);
                if (paymetRequest != null)
                {
                    paymetRequest.Process();

                    Console.WriteLine("\n\nPress 1 to continue else press 0 to stop.");
                    flag = Convert.ToInt32(Console.ReadLine());
                }
                else
                {
                    Console.WriteLine("The request you selected is incorrect.\nPlease select the correct option.");
                    flag = 1;
                }
            }while (flag == 1);

            Console.ReadKey();
        }
        public void ProcessOrderWithValidData()
        {
            //Arrange the data
            var type = "Video";

            //Perform the Action
            OrderProcessFactory selectType = new ConcreteOrderProcessFactory();
            var processType = selectType.GetOrderProcessType(type);
            var result      = processType.Process();

            //Assert
            Assert.IsTrue(result.Length > 0, "Test case passed as some data has been returned by repository");
            Assert.IsFalse(result.Length == 0, "This means something has been written by respository");
        }
        public void ProcessOrderWithInValidData()
        {
            //Arrange the data
            var    type   = "Video123";
            string result = string.Empty;
            //Perform the Action
            OrderProcessFactory selectType = new ConcreteOrderProcessFactory();
            var processType = selectType.GetOrderProcessType(type);

            if (processType != null)
            {
                result = processType.Process();
            }

            //Assert
            Assert.IsTrue(result.Length == 0, "Test case did not pass as the request type passed is incorrect");
        }