public async Task AddPairDataAsync_CorrectData_AddsEntry() { var testDate = new DateTime(2020, 9, 9); var expectedCurrencyData = new CreateOrUpdateCurrencyData { PairName = "XRP-USD", BuyPrice = 254.0m, SellPrice = 254.0m, LastTradePrice = 254.0m, HighPrice = 254.0m, LowPrice = 254.0m, Volume = 1234567, Updated = testDate }; var actualBefore = await TestApiDbContext.Pairs.ToListAsync(); var actualId = await _bittrexService.AddPairDataAsync(expectedCurrencyData); var actualAfter = await TestApiDbContext.Pairs.SingleAsync(); actualBefore.Should().BeEmpty(); actualAfter.PairId.Should().Be(actualId); actualAfter.Should().BeEquivalentTo(expectedCurrencyData); }
public Task <long> AddPairData(CreateOrUpdateCurrencyData data) { return(_bittrexService.AddPairDataAsync(data)); }