Exemplo n.º 1
0
        public void Order_OrderMorning231_ShowseggsToastCoffeeSucessfully()
        {
            var c = new Ordering();
            string input = "morning,2,3,1";
            c.CreateMeal(input);
            var orderResult = c.DisplayMeal(); 

            Assert.IsTrue(orderResult == "eggs, toast, coffee");
        }
Exemplo n.º 2
0
 public void Order_OrderMorning1223_StopAfterEgg()
 {
     var c = new Ordering();
     string input = "morning,1,2,2,3";
     c.CreateMeal(input);
     var orderResult = c.DisplayMeal(); 
     
     Assert.IsTrue(orderResult == "eggs, error");
 }
Exemplo n.º 3
0
        public void Order_MorningUpperCase_ShowseggsToastCoffeeSucessfully()
        {
            var c = new Ordering();
            string input = "MORNING,1,2,3";
            c.CreateMeal(input);
            var orderResult = c.DisplayMeal(); 

            Assert.IsTrue(orderResult == "eggs, toast, coffee");
        }
Exemplo n.º 4
0
        static void Main(string[] args)
        {
            log4net.Config.XmlConfigurator.Configure();
            
            string input = "";

            Console.WriteLine("To quit, press q.");

            while (true)
            {
                Console.Write("Please, input your order: ");
                input = Console.ReadLine();

                if (input.ToLower() == "q")
                {
                    break;
                }

                Ordering ordering = new Ordering();
                ordering.CreateMeal(input);
                Console.WriteLine(ordering.DisplayMeal());
            }

        }
Exemplo n.º 5
0
        public void Order_OrderMorningMultipleDrinks_ReturnDrinkWithMultiplicitySignal()
        {
            var c = new Ordering();
            string input = "morning,1,2,3,3,3";
            c.CreateMeal(input);
            var orderResult = c.DisplayMeal(); 

            Assert.IsTrue(orderResult == "eggs, toast, coffee(x3)");
        }
Exemplo n.º 6
0
        public void Order_OrderMorningNotApplicableDish_ShowErrorMessageAfterValidMessages()
        {
            var c = new Ordering();
            string input = "morning,1,2,3,4";
            c.CreateMeal(input);
            var orderResult = c.DisplayMeal(); 

            Assert.IsTrue(orderResult == "eggs, toast, coffee, error");
        }
Exemplo n.º 7
0
 public void Order_InputInvalidMeal_ShowErrorWord()
 {
     var c = new Ordering();
     string input = "afternoon,1,2,2,2,3,3,3,4";
     c.CreateMeal(input);
     var orderResult = c.DisplayMeal(); 
     
     Assert.IsTrue(orderResult == "error");
 }
Exemplo n.º 8
0
        public void Order_OrderNightInvalidDishRepetition_ShowMultipleErros()
        {
            var c = new Ordering();
            string input = "night,1,2,2,2,3,3,3,4";
            c.CreateMeal(input);
            var orderResult = c.DisplayMeal(); 

            Assert.IsTrue(orderResult == "steak, potato(x3), error");
        }
Exemplo n.º 9
0
        public void Order_NightUpperCase_ShowMultipleSides()
        {
            var c = new Ordering();
            string input = "NIGHT,1,2,2,4";
            c.CreateMeal(input);
            var orderResult = c.DisplayMeal();

            Assert.IsTrue(orderResult == "steak, potato(x2), error");
        }
Exemplo n.º 10
0
        public void Order_OrderNight1234_ShowSteakPotatoWineCake()
        {
            var c = new Ordering();
            string input = "night,1,2,3,4";
            c.CreateMeal(input);
            var orderResult = c.DisplayMeal(); 

            Assert.IsTrue(orderResult == "steak, potato, wine, cake");
        }