public void DeleteTest() { var firstProduct = _db.Products.First(); _store.Delete(firstProduct); var noFound = _db.Products.FirstOrDefault(p => p.Id == firstProduct.Id); Assert.Null(noFound); var found = _db.Products.FirstOrDefault(p => p.Id == firstProduct.Id); Assert.Null(found); }
public void DeleteTest() { CreateTest(); var preCount = _db.Products.Count(); var firstProduct = _db.Products.First(); _store.Delete(firstProduct); var postCount = _db.Products.Count(); Assert.AreEqual(preCount - 1, postCount); var found = _db.Products.FirstOrDefault(p => p.Id == firstProduct.Id); Assert.IsNull(found); }
public void Delete(string sku) { _productStore.Delete(sku); }