From 39be3d5b833d374a7e03f7830a4ae52649a2767a Mon Sep 17 00:00:00 2001 From: sonvister Date: Wed, 4 Apr 2018 11:51:34 -0500 Subject: [PATCH] Update unit test --- test/Binance.Tests/Market/CandlestickTest.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/Binance.Tests/Market/CandlestickTest.cs b/test/Binance.Tests/Market/CandlestickTest.cs index 90088eb2..4c06d746 100644 --- a/test/Binance.Tests/Market/CandlestickTest.cs +++ b/test/Binance.Tests/Market/CandlestickTest.cs @@ -31,7 +31,9 @@ public void Throws() Assert.Throws("low", () => new Candlestick(symbol, interval, openTime, open, high, -1, close, volume, closeTime, quoteAssetVolume, numberOfTrades, takerBuyBaseAssetVolume, takerBuyQuoteAssetVolume)); Assert.Throws("close", () => new Candlestick(symbol, interval, openTime, open, high, low, -1, volume, closeTime, quoteAssetVolume, numberOfTrades, takerBuyBaseAssetVolume, takerBuyQuoteAssetVolume)); - Assert.Throws("volume", () => new Candlestick(symbol, interval, openTime, open, high, low, close, -1, closeTime, quoteAssetVolume, numberOfTrades, takerBuyBaseAssetVolume, takerBuyQuoteAssetVolume)); + // HACK: https://api.binance.com/api/v1/klines?symbol=TRXBTC&interval=1M returns negative volume. + //Assert.Throws("volume", () => new Candlestick(symbol, interval, openTime, open, high, low, close, -1, closeTime, quoteAssetVolume, numberOfTrades, takerBuyBaseAssetVolume, takerBuyQuoteAssetVolume)); + Assert.Throws("quoteAssetVolume", () => new Candlestick(symbol, interval, openTime, open, high, low, close, volume, closeTime, -1, numberOfTrades, takerBuyBaseAssetVolume, takerBuyQuoteAssetVolume)); Assert.Throws("takerBuyBaseAssetVolume", () => new Candlestick(symbol, interval, openTime, open, high, low, close, volume, closeTime, quoteAssetVolume, numberOfTrades, -1, takerBuyQuoteAssetVolume)); Assert.Throws("takerBuyQuoteAssetVolume", () => new Candlestick(symbol, interval, openTime, open, high, low, close, volume, closeTime, quoteAssetVolume, numberOfTrades, takerBuyBaseAssetVolume, -1));