Beispiel #1
0
        private void AddNewMenuItem()
        {
            Console.Clear();
            CafeContent menu = new CafeContent();

            Console.WriteLine("Press any key to begin adding a new menu item.");
            Console.ReadKey();

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

            Console.WriteLine("Please enter a description for the meal:");
            menu.Description = Console.ReadLine();

            Console.WriteLine("Please enter the ingredients:");
            menu.Ingredients = Console.ReadLine();

            Console.WriteLine("Please enter the associated meal number:");
            menu.MealNumber = Int32.Parse(Console.ReadLine());

            Console.WriteLine("Please enter the price for the meal:");
            menu.Price = double.Parse(Console.ReadLine());

            _menuRepo.AddItemToMenu(menu);
        }
Beispiel #2
0
        public void Arrange()
        {
            _repo = new CafeRepository();

            //add a menu item
            _content = new CafeContent("Hamburger", "Meat in between two buns with some toppings", "Meat, bread, lettuce", 1, 2.50);

            //add movie to database
            _repo.AddItemToMenu(_content);
        }
Beispiel #3
0
        public void AddMenuItemTest()
        {
            //arrange
            CafeContent    item       = new CafeContent();
            CafeRepository repository = new CafeRepository();

            //act
            bool addItem = repository.AddItemToMenu(item);

            //assert
            Assert.IsTrue(addItem);
        }