public void DeleteMeal_True()
        {
            // Arrange
            MealContentRepo repo = new MealContentRepo();
            MealContent     meal = new MealContent(5, "Turkey Breakfast", "Toast, turkey sausage, egg whites, wheat toast, and Milk.", 9, MealType.Breakfast);
            // Act
            bool deleteThisTest = repo.DeleteMeal(meal.MealNumber);

            // Assert
            Assert.IsTrue(deleteThisTest);
        }
Пример #2
0
        private void DeleteTheMeal()
        {
            SeeFullList();
            Console.WriteLine("Please enter the meal number you'd like to remove:");

            string mealAsString = Console.ReadLine();
            int    mealNumber   = int.Parse(mealAsString);

            bool weDeletedIt = _mealContentRepo.DeleteMeal(mealNumber);

            if (weDeletedIt)
            {
                Console.WriteLine("\nThe meal has been deleted.\n");
            }
            else
            {
                Console.WriteLine("\nThe meal could not be removed.\n");
            }
        }