Example #1
0
        public void AddToMenu()
        {
            MenuItem item = new MenuItem();

            item.MealNumber = 1;

            MenuItem_Repo repo = new MenuItem_Repo();

            repo.AddItemToDirectory(item);

            MenuItem itemFromDirectory = repo.GetMealByNum(1);

            Assert.IsNotNull(itemFromDirectory);
        }
Example #2
0
        private void CreateNewContent()
        {
            Console.Clear();

            MenuItem item = new MenuItem();

            Console.WriteLine("Please enter the meal number: ");
            item.MealNumber = Convert.ToInt32(Console.ReadLine());

            Console.WriteLine("Please enter the meal name: ");
            item.MealName = Console.ReadLine();

            Console.WriteLine("Please enter the meal description: ");
            item.MealDescription = Console.ReadLine();

            Console.WriteLine("Please enter the meal ingredients: ");
            item.MealIngredients = Console.ReadLine();

            Console.WriteLine("Please enter the meal price: ");
            item.MealPrice = Convert.ToDouble(Console.ReadLine());

            _repo.AddItemToDirectory(item);
        }