public void DeleteAll_Test() { var entityList = _repo.Get().Result; Assert.NotEmpty(entityList); var delete = _repo.DeleteAll().Result; var entityListRecheck = _repo.Get().Result; Assert.True(delete); Assert.Empty(entityListRecheck); }
public ExchangeUpdateRepositoryTests() { _repo = new ExchangeUpdateRepository(); // first clear out the table var deleted = _repo.DeleteAll().Result; // then add some data for testing datas.Add( new ExchangeUpdate { Id = 0, Exchange = Business.Entities.Exchange.Binance, UpdateAt = DateTime.UtcNow }); datas.Add( new ExchangeUpdate { Id = 0, Exchange = Business.Entities.Exchange.Bittrex, UpdateAt = DateTime.UtcNow }); var addedEntites = _repo.AddAll(datas).Result; }