private void DeleteFoodFromMenu()
        {
            Console.Clear();

            Console.WriteLine("What food would you like to delete from the menu?");
            var mealName     = Console.ReadLine();
            var selectedItem = _menuRepo.FindFoodOnMenu(mealName);

            _menuRepo.DeleteFoodFromMenu(selectedItem);

            Console.WriteLine("Food has been deleted.");
            RunStartMenu();
        }
Beispiel #2
0
        public void ShouldRemoveFoodFromMenu()
        {
            MenuRepo _menuRepo = new MenuRepo();

            Foods item1 = new Foods();
            Foods item2 = new Foods();

            _menuRepo.AddFoodToMenu(item1);
            _menuRepo.AddFoodToMenu(item2);

            _menuRepo.DeleteFoodFromMenu(item1);


            var list = _menuRepo.GetList();

            int actual   = list.Count;
            int expected = 1;

            Assert.AreEqual(expected, actual);
        }