示例#1
0
        public void RepoItemsCount()
        {
            int initialCount = _repo.GetMenuItems().Count;
            int expected     = 3;

            Assert.AreEqual(expected, initialCount);
        }
示例#2
0
        private void DisplayAllMenuItems()
        {
            Console.Clear();
            var allMenuItems = _menuItemsRepo.GetMenuItems();

            Console.WriteLine("\nNumber:  Name:");
            foreach (var menuItem in allMenuItems)
            {
                DisplayMenuItem(menuItem);
            }
            Console.WriteLine();
        }
示例#3
0
        //View current items dialog
        private void DisplayAllItems()
        {
            Console.Clear();
            List <MenuItems> menuItems = _menuItemsRepo.GetMenuItems();
            int mealCount = 1;

            foreach (MenuItems item in menuItems)
            {
                item.MealNum = mealCount;
                DisplayItemsByNum(item);
                mealCount++;
            }
        }
        private void ViewAllMenuItems()
        {
            Console.Clear();

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

            foreach (MenuItems items in listOfMenuItems)
            {
                Console.WriteLine($"Meal number: {items.MealNumber}\n" +
                                  $"Meal Name: {items.MealName}\n" +
                                  $"Meal Description: {items.MealDescription}\n" +
                                  $"Meal Ingredients: {items.MealIngredients}\n" +
                                  $"Meal Price: {items.MealPrice}");
            }
        }
示例#5
0
        public void GetMenuItems_ShouldReturnMenuItems()
        {
            List <MenuItem> listFromRepo = _repo.GetMenuItems();

            Assert.IsNotNull(listFromRepo);
        }