public void Update()
        {
            var productExisting = _productOptions.First();

            productExisting.Description = "this is updated";
            _productOptionLibrary.Update(MapProductOptionToProductOptionView(productExisting));

            Assert.That(_productOptions.First().Description, Is.EqualTo(productExisting.Description));
        }
Пример #2
0
 public IHttpActionResult UpdateOption(ProductOptionView option)
 {
     try
     {
         _productOptionLibrary.Update(option);
         return(Ok());
     }
     catch (Exception ex)
     {
         return(BadRequest(ex.Message + ex.InnerException?.Message + ex.InnerException?.StackTrace));
     }
 }