Ejemplo n.º 1
0
        private void CreateNewContent()
        {
            Console.Clear();
            MenuContent newContent = new MenuContent();

            Console.WriteLine("Enter the number for the new meal number:");
            string mealNumberAsString = Console.ReadLine();

            newContent.MealNumber = int.Parse(mealNumberAsString);

            Console.WriteLine("Enter the name for the new meal name:");
            newContent.MealName = Console.ReadLine();

            Console.WriteLine("Enter a description of this new meal:");
            newContent.Description = Console.ReadLine();

            Console.WriteLine("Enter a list of ingredients to be indluded in this meal:");
            newContent.ListOfIngredients = Console.ReadLine();

            Console.WriteLine("Enter a price for this meal:");
            string priceAsString = Console.ReadLine();

            newContent.Price = decimal.Parse(priceAsString);

            _menuRepo.AddContentToMenu(newContent);
        }
        public void Arrange()
        {
            _menuRepo = new MenuContentRepository();
            _content  = _menuRepo.GetMenuContent();

            MenuContent content      = new MenuContent(1, "Tuna Salad Sandwich", "Tuna salad on Wheat Bread with a side", "Wheat bread and tuna salad", 7.50m);
            MenuContent contentTwo   = new MenuContent(2, "Hamburger and fries Combo", "Beef burger on bun with fries", "All beef patty and bun", 9.0m);
            MenuContent contentThree = new MenuContent(3, "Spinach salad with dressing choice", "Spinach salad with choice of dressing", "spinach and veggies", 10.0m);
            MenuContent contentFour  = new MenuContent(4, "Soup of the Day combo", "Daily soup with choice of side", "Broth with veeggies", 6.50m);
            MenuContent contentFive  = new MenuContent(5, "Slice of Pizza combo", "Daily slice of pizza with choice of side", "Cheese with toppings and crust", 7.50m);


            _menuRepo.AddContentToMenu(content);
            _menuRepo.AddContentToMenu(contentTwo);
            _menuRepo.AddContentToMenu(contentThree);
            _menuRepo.AddContentToMenu(contentFour);
            _menuRepo.AddContentToMenu(contentFive);
        }