public void Add_Test() { var entity = datas[0]; var addedEntity = _repo.Add(entity).Result; Assert.NotNull(addedEntity); Assert.True(addedEntity.Id > 0); }
/// <summary> /// Updates Portfolio with latest data from exchanges /// </summary> /// <returns>DateTime of update</returns> public async Task <DateTime> UpdatePortfolio() { await BuildCoinsFromExchanges(); await BuildOrders(); this.lastUpdated = DateTime.UtcNow; var exchanges = _exchangeApis.Select(e => e.Exchange).ToList(); foreach (var exchange in exchanges) { var exchg = new Entities.Trade.ExchangeUpdate { Exchange = exchange, UpdateAt = lastUpdated }; await _exchangeUpdateRepo.Add(exchg); } return(lastUpdated); }