示例#1
0
        private void ShowAllMenuItems()
        {
            List <CafeMenu> listOfMenuItems = _listOfMenuItems.GetMenuItems();

            foreach (CafeMenu content in listOfMenuItems)
            {
                Console.WriteLine($"{content.MealNumber}. {content.TypeOfOrder}\n ${content.CostOfItem}\n {content.Description}");
            }
            Console.WriteLine("Press Any Key to Continue");
            Console.ReadKey();
        }
        public void CafeMenuAddContentTest()
        {
            _cafeRepo.AddMenuItemToList(_cafeContent);

            int expected = 1;
            int actual   = _cafeRepo.GetMenuItems().Count;

            Assert.AreEqual(expected, actual);
        }
        //View current menu items
        private void ViewCurrentMenuItems()
        {
            Console.Clear();

            List <Cafe> listOfMenuItems = _menuRepo.GetMenuItems();

            foreach (Cafe item in listOfMenuItems)
            {
                string writeIngredients = null;
                foreach (string ingredients in item.Ingredients)
                {
                    writeIngredients = ingredients;
                }
                Console.WriteLine($"Meal Number: {item.MealNumber}\n" +
                                  $"Meal Name: {item.MealName}\n" +
                                  $"Description: {item.Description}\n" +
                                  $"Ingredients: {writeIngredients}\n" +
                                  $"Price: {item.Price}\n" +
                                  $"\n");
            }
        }