Esempio n. 1
0
        public void DeleteContent_ShouldReturnTrue()
        {
            //Arrange


            //Act
            bool deleteResult = _repo.RemoveMealFromList(_mealContent.MealName);

            //Assert
            Assert.IsTrue(deleteResult);
        }
Esempio n. 2
0
        public void DeleteAnExistingMeal()
        {
            DisplayAllMeals();

            Console.WriteLine("Please enter a meal to be removed: ");
            string mealName = Console.ReadLine().ToLower();

            bool wasDeleted = _mealContents.RemoveMealFromList(mealName);

            if (wasDeleted)
            {
                Console.WriteLine("The meal was deleted successfully");
            }
            else
            {
                Console.WriteLine("Could not remove the meal");
            }
        }
Esempio n. 3
0
        private void DeleteMealFromMenu()
        {
            ViewAllMeals();

            Console.WriteLine("Please enter the name of meal");
            string mealAnswer = Console.ReadLine();

            bool wasDeleted = _mealRepo.RemoveMealFromList(mealAnswer);

            if (wasDeleted)
            {
                Console.WriteLine("The meal was removed from the menu.");
            }
            else
            {
                Console.WriteLine("The meal could not be removed successfully");
            }
        }