Exemple #1
0
        public void UpdateMenuItems_ShouldReturnpdatedValue()
        {
            CafeMenu           menuItem   = new CafeMenu();
            CafeMenuRepository repository = new CafeMenuRepository();

            _repo.UpdateMenu("Grilled Cheese", new CafeMenu("Banana", 5, "its a banana", "just banana", 2));

            Assert.AreEqual(_cafeMenu.MealName, "Grilled Cheese");
        }
Exemple #2
0
        public void CreateNewItem_ShouldReturnCorrect()
        {
            CafeMenu           menuItem   = new CafeMenu();
            CafeMenuRepository repository = new CafeMenuRepository();

            bool result = repository.CreateMenuItems(menuItem);

            Assert.IsTrue(result);
        }
Exemple #3
0
        public void ViewMenu_ShouldReturnFullMenu()
        {
            CafeMenu           menuItem   = new CafeMenu();
            CafeMenuRepository repository = new CafeMenuRepository();

            repository.CreateMenuItems(menuItem);

            List <CafeMenu> directory = repository.ViewMenu();

            bool hasContent = directory.Contains(menuItem);

            Assert.IsTrue(hasContent);
        }
Exemple #4
0
 public void Arrange()
 {
     _repo     = new CafeMenuRepository();
     _cafeMenu = new CafeMenu("Grilled Cheese", 4, "Cheese and bread put into the toaster", "cheese, bread", 5);
     _repo.CreateMenuItems(_cafeMenu);
 }