public async Task GetCompressedAggregateTrades_Null_Throws() { // Arrange // Act // Assert await Assert.ThrowsAsync <ArgumentNullException>(() => ConcreteBinanceClient.GetCompressedAggregateTrades(null)); }
public async Task GetCompressedAggregateTrades_NullSymbol_Throws() { // Arrange var request = new GetCompressedAggregateTradesRequest() { Symbol = null, }; // Act // Assert await Assert.ThrowsAsync <ArgumentNullException>(() => ConcreteBinanceClient.GetCompressedAggregateTrades(request)); }
public async Task GetCompressedAggregateTrades_StartTimeMin_Throws() { // Arrange var request = new GetCompressedAggregateTradesRequest() { Symbol = "ETHBTC", StartTime = DateTime.MinValue, }; // Act // Assert await Assert.ThrowsAsync <ArgumentNullException>(() => ConcreteBinanceClient.GetCompressedAggregateTrades(request)); }
public async Task GetCompressedAggregateTrades_ValidRequest_CallsProcessGetRequest() { // Arrange var request = new GetCompressedAggregateTradesRequest() { Symbol = "ETHBTC", StartTime = DateTime.UtcNow.AddHours(-1), EndTime = DateTime.UtcNow, }; // Act await ConcreteBinanceClient.GetCompressedAggregateTrades(request); // Assert MockAPIProcessor.Verify(i => i.ProcessGetRequest <List <CompressedAggregateTradeResponse> >( It.Is <BinanceEndpointData>(u => u.Uri.Equals(Endpoints.MarketData.CompressedAggregateTrades(request).Uri)), 5000), Times.Once()); }