public void ProductSpecificationAttributeController_EditPost_CallsUpdateOptionOnTheManager() { var controller = GetProductSpecificationAttributeController(); var option = new ProductSpecificationAttribute(); var editPost = controller.Edit_POST(option); A.CallTo(() => _productOptionManager.UpdateSpecificationAttribute(option)).MustHaveHappened(); }
public ActionResult Edit_POST(ProductSpecificationAttribute option) { if (ModelState.IsValid) { _productOptionManager.UpdateSpecificationAttribute(option); return(RedirectToAction("Index")); } else { return(PartialView(option)); } }