Exemplo n.º 1
0
 public ActionResult Edit([Bind(Include = "RecipeCategoryId,Name,Id")] RecipeCategory RecipeCategory)
 {
     if (ModelState.IsValid)
     {
         _recipeCategoryService.Update(RecipeCategory);
         return(RedirectToAction("Index"));
     }
     return(View(RecipeCategory));
 }
        public void Update_ShouldCallRepositoryUpdate()
        {
            //Arrange
            var recipeCategory = new RecipeCategory()
            {
            };

            //Act
            _service.Update(recipeCategory);

            //Assert
            _repository.Received(1).Update(recipeCategory);
        }