public void Should_Success_Delete_Order_ByIdAndTSNewContext() { var item = _orderRepository.FindUnTracked(1, 7); using (var db = new StoreContext()) { var repo = new OrderRepositoty(new ProductRepository(db), db); repo.Delete(item.Id, item.TimeStamp); repo.Dispose(); } Assert.Equal(0, _orderRepository.GetAll().Count()); }
public OrderRepositotyTests() { _db = new StoreContext(); _orderRepository = new OrderRepositoty(new ProductRepository(_db), _db, true); Initializer.InitializeData(_db); }