예제 #1
0
        public ActionResult Show(int menuItemIngredientId)
        {
            MenuItemIngredient menuItemIngredient = MenuItemIngredient.Find(menuItemIngredientId);
            int      menuItemId = menuItemIngredient.GetMenuItemsId();
            MenuItem menuItem   = MenuItem.Find(menuItemId);
            int      storeId    = menuItemIngredient.GetStoreId();
            Store    store      = Store.Find(storeId);
            Dictionary <string, object> model = new Dictionary <string, object>();

            model.Add("menuItemIngredient", menuItemIngredient);
            model.Add("menuItem", menuItem);
            model.Add("store", store);
            return(View(model));
        }
        public void GetMenuItemsId_ReturnsMenuItemsId_Int()
        {
            //Arrange
            string             menuItemIngredientDescription = "Avocadoes";
            int                menuItemsId           = 1;
            int                storeId               = 1;
            MenuItemIngredient newMenuItemIngredient = new MenuItemIngredient(menuItemIngredientDescription, menuItemsId, storeId);

            //Act
            int result = newMenuItemIngredient.GetMenuItemsId();

            //Assert
            Assert.AreEqual(menuItemsId, result);
        }