public virtual void GetCandlesticks_ShouldSuccess() { // Arrange OkexTokenAPI exchange = new OkexTokenAPI(new OkexTokenAPIStub()); // Act (one single action only) IList <Candle> candles = exchange.GetCandlesticks("BTC-USDT", CandleType.OneHour, DateTime.Now.Subtract(TimeSpan.FromDays(1)), DateTime.Now); // Assert Assert.IsNotNull(candles); }
public virtual void GetCandlesticks_BadSymbol_ShouldThrowException() { bool exceptionThrown = false; // Arrange OkexTokenAPI exchange = new OkexTokenAPI(new OkexTokenAPIStub()); // Act (one single action only) try { exchange.GetCandlesticks(null, CandleType.OneHour, DateTime.Now.Subtract(TimeSpan.FromDays(1)), DateTime.Now); } catch (Exception) { exceptionThrown = true; } // Assert Assert.IsTrue(exceptionThrown); }