예제 #1
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");
        }
예제 #2
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");
        }
예제 #3
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");
 }
예제 #4
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");
        }
예제 #5
0
파일: Program.cs 프로젝트: rkoga/GFT.TEST
        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());
            }

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