Example #1
0
        public void AddMealToMenuTest()
        {
            _menuRepo.AddNewMeal(_meal);
            int expected = 1;
            int actual   = _menuRepo.GetMealsList().Count;

            Assert.AreEqual(expected, actual);
        }
Example #2
0
        private void CreateAndAddNewMeal()
        {
            CafeMeal meal = new CafeMeal();

            Console.Write("Please enter a meal name: ");
            meal.Name = Console.ReadLine();

            Console.Write("Please enter a meal number: ");
            meal.Number = int.Parse(Console.ReadLine());

            Console.Write("Please enter a meal description: ");
            meal.Description = Console.ReadLine();

            Console.Write("Please enter all ingredients used in the meal: ");
            meal.Ingredients = Console.ReadLine();

            Console.Write("Please enter the price of the meal: ");
            meal.Price = decimal.Parse(Console.ReadLine());

            _menuRepo.AddNewMeal(meal);
        }