Exemplo n.º 1
0
        public void AddTest()
        {
            MenuItem item1 = new MenuItem(
                1,
                "The Big One",
                "A half pound of beef between on a warm brioche bun, topped with a slice of cheddar cheese and crisp onion and lettuce.",
                7.99m,
                "cheese, beef, lettuce, onion, brioche bun");

            bool itemadded = _repo.AddMenuItemtoDirectory(item1);

            Assert.IsTrue(itemadded);
            Console.WriteLine(item1.Ingredients);
            Console.WriteLine(_repo.GetItems().Count);
        }
Exemplo n.º 2
0
        private void AddMenuItem()
        {
            Console.Clear();

            MenuItem item = new MenuItem();

            Console.WriteLine("Enter Menu Number");
            item.MenuNumber = int.Parse(Console.ReadLine());

            Console.WriteLine("Enter Meal Name");
            item.MealName = Console.ReadLine();

            Console.WriteLine("Enter Meal Description");
            item.MealDescription = Console.ReadLine();

            Console.WriteLine("Enter Meal Price");
            item.MealPrice = decimal.Parse(Console.ReadLine());

            Console.WriteLine("List Ingredients");
            item.Ingredients = Console.ReadLine();

            _repo.AddMenuItemtoDirectory(item);
        }