Esempio n. 1
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);
        }
Esempio n. 2
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);
        }
Esempio n. 3
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);
        }