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