private void SeedMenu()
        {
            List <string> ingsList = new List <string>();

            ingsList.Add("patty");
            ingsList.Add("buns");

            Foods item1 = new Foods(1, "Hamburger", "Two buns and a beef patty", ingsList, 8);
            Foods item2 = new Foods(2, "Cheeseburger", "Two buns, beef patty, and cheese", ingsList, 9);
            Foods item3 = new Foods(3, "Turkey Burger", "Two buns, turkey patty", ingsList, 10);

            _menuRepo.AddFoodToMenu(item1);
            _menuRepo.AddFoodToMenu(item2);
            _menuRepo.AddFoodToMenu(item3);
        }
Example #2
0
        public void ShouldRemoveFoodFromMenu()
        {
            MenuRepo _menuRepo = new MenuRepo();

            Foods item1 = new Foods();
            Foods item2 = new Foods();

            _menuRepo.AddFoodToMenu(item1);
            _menuRepo.AddFoodToMenu(item2);

            _menuRepo.DeleteFoodFromMenu(item1);


            var list = _menuRepo.GetList();

            int actual   = list.Count;
            int expected = 1;

            Assert.AreEqual(expected, actual);
        }
Example #3
0
        public void ShouldFindSearchedFoodOnMenu()
        {
            MenuRepo _menuRepo = new MenuRepo();

            Foods item1 = new Foods();

            item1.Name = "Burger";
            _menuRepo.AddFoodToMenu(item1);

            Foods actual   = _menuRepo.FindFoodOnMenu("Burger");
            Foods expected = item1;

            Assert.AreEqual(expected, actual);
        }
Example #4
0
        public void ShouldAddFoodToMenu()
        {
            MenuRepo _menuRepo = new MenuRepo();

            Foods item = new Foods();

            _menuRepo.AddFoodToMenu(item);

            var list = _menuRepo.GetList();

            int actual   = list.Count;
            int expected = 1;

            Assert.AreEqual(expected, actual);
        }