public void UpdateTest() { var firstProduct = _db.Products.First(); firstProduct.Price += 100; DateTime now = DateTime.Now; _store.Update(firstProduct); var changedProduct = _db.Products.FirstOrDefault(p => p.Id == firstProduct.Id); Assert.IsNotNull(changedProduct); Assert.AreEqual(firstProduct.Price, changedProduct.Price); Assert.IsTrue(changedProduct.LastUpdate >= now); }
public Product Put(string sku, Product product) { _productStore.Update(product, sku); return(product); }