Exemplo n.º 1
0
        public void AddToMenu()
        {
            CafeMenu           menu       = new CafeMenu(2, "Fish", "Fish", 3.00);
            CafeMenuRepository repository = new CafeMenuRepository();

            bool addItem = repository.AddMenuItemToDirectory(menu);

            Assert.IsTrue(addItem);
        }
Exemplo n.º 2
0
        private void AddMenuItem()
        {
            Console.Clear();
            CafeMenu menu = new CafeMenu();

            Console.WriteLine("You are about to add a new menu item.");

            Console.WriteLine("Please enter a Name for the item:");
            menu.Name = Console.ReadLine();

            Console.WriteLine("Please enter the Ingreedients for the item:");
            menu.Ingredients = Console.ReadLine();

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

            //Actually adds it to the list.
            _menuDirectory.AddMenuItemToDirectory(menu);
        }
Exemplo n.º 3
0
        public void ShowAllMenu()
        {
            CafeMenu           menu = new CafeMenu();
            CafeMenuRepository repo = new CafeMenuRepository();

            repo.AddMenuItemToDirectory(menu);

            List <CafeMenu> ListOfMenuItems = repo.GetMenu();

            bool menuHasItem = ListOfMenuItems.Contains(menu);

            Assert.IsTrue(menuHasItem);
        }
Exemplo n.º 4
0
        public void Arrange()
        {
            CafeMenu _menu = new CafeMenu(4, "Land", "Land", 5.00);

            _repo.AddMenuItemToDirectory(_menu);
        }