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)); }
public IHttpActionResult Update(ProductView product) { try { _productLibrary.Update(product); return(Ok()); } catch (Exception ex) { return(BadRequest(ex.Message + ex.InnerException?.Message + ex.InnerException?.StackTrace)); } }