Пример #1
0
        public void Update()
        {
            var productExisting = _products.First();

            productExisting.Description = "this is updated";
            _productLibrary.Update(MapProductToProductView(productExisting));

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