public virtual void GetTicker_ShouldSuccess() { // Arrange OkexTokenAPI exchange = new OkexTokenAPI(new OkexTokenAPIStub()); // Act (one single action only) Ticker ticker = exchange.GetTicker("BTC-USDT"); // Assert Assert.IsNotNull(ticker); }
public virtual void GetTicker_BadSymbol_ShouldThrowException() { bool exceptionThrown = false; // Arrange OkexTokenAPI exchange = new OkexTokenAPI(new OkexTokenAPIStub()); // Act (one single action only) try { exchange.GetTicker(null); } catch (Exception) { exceptionThrown = true; } // Assert Assert.IsTrue(exceptionThrown); }