public virtual void NewOrder_NoPriceForLimitOrders_ShouldThrowException() { bool exceptionThrown = false; // Arrange BitmexAPI exchange = new BitmexAPI(new BitmexAPIStub()); exchange.SetKeys("some_dummy_key", "some_dummy_secret"); // Act (one single action only) try { exchange.NewOrder("XBTUSD", OrderType.Limit, 100, OrderSide.Buy, null, null); } catch (Exception) { exceptionThrown = true; } // Assert Assert.IsTrue(exceptionThrown); }
public virtual void GetOrderBook_BadSymbol_ShouldThrowException() { bool exceptionThrown = false; // Arrange BitmexAPI exchange = new BitmexAPI(new BitmexAPIStub()); exchange.SetKeys("some_dummy_key", "some_dummy_secret"); // Act (one single action only) try { exchange.GetOrderBook(null); } catch (Exception) { exceptionThrown = true; } // Assert Assert.IsTrue(exceptionThrown); }