Exemple #1
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");
        }
Exemple #2
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");
        }
Exemple #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");
        }
Exemple #4
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");
        }
Exemple #5
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");
        }
Exemple #6
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");
        }
Exemple #7
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");
        }
Exemple #8
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");
        }
Exemple #9
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)");
        }
Exemple #10
0
        static void Main(string[] args)
        {
            string input = "";

            Console.WriteLine("To exit, digit e.");
            Console.Write("Please, input your order: ");

            while ((input = Console.ReadLine().ToLower()) != "e")
            {
                Ordering ordering = new Ordering();
                ordering.CreateMeal(input);
                Console.WriteLine(ordering.DisplayMeal());

                Console.Write("Please, input your order: ");
            }
        }