Esempio n. 1
0
        public void ProductSpecificationAttributeController_Add_CallsAddOnTheProductOptionManager()
        {
            var controller = GetProductSpecificationAttributeController();
            var option     = new ProductSpecificationAttribute();

            var add = controller.Add(option);

            A.CallTo(() => _productOptionManager.AddSpecificationAttribute(option)).MustHaveHappened();
        }
Esempio n. 2
0
 public ActionResult Add(ProductSpecificationAttribute option)
 {
     if (ModelState.IsValid)
     {
         _productOptionManager.AddSpecificationAttribute(option);
         return(RedirectToAction("Index"));
     }
     else
     {
         return(PartialView(option));
     }
 }