예제 #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");
        }
예제 #2
0
        public void CreateNewItem_ShouldReturnCorrect()
        {
            CafeMenu           menuItem   = new CafeMenu();
            CafeMenuRepository repository = new CafeMenuRepository();

            bool result = repository.CreateMenuItems(menuItem);

            Assert.IsTrue(result);
        }
예제 #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);
        }
예제 #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);
 }