public void ProductSpecificationAttributeController_Add_CallsAddOnTheProductOptionManager() { var controller = GetProductSpecificationAttributeController(); var option = new ProductSpecificationAttribute(); var add = controller.Add(option); A.CallTo(() => _productOptionManager.AddSpecificationAttribute(option)).MustHaveHappened(); }
public ActionResult Add(ProductSpecificationAttribute option) { if (ModelState.IsValid) { _productOptionManager.AddSpecificationAttribute(option); return(RedirectToAction("Index")); } else { return(PartialView(option)); } }