public virtual void GetOrder_NotAuthenticated_ShouldThrowException() { bool exceptionThrown = false; // Arrange BitmexAPI exchange = new BitmexAPI(new BitmexAPIStub()); // Act (one single action only) try { exchange.GetOrder("XBTUSD", "some_order_id"); } catch (Exception) { exceptionThrown = true; } // Assert Assert.IsTrue(exceptionThrown); }
public virtual void GetOrder_ShouldSuccess() { // Arrange BitmexAPI exchange = new BitmexAPI(new BitmexAPIStub()); exchange.SetKeys("some_dummy_key", "some_dummy_secret"); // Act (one single action only) Order order = exchange.GetOrder("XBTUSD", "some_order_id"); // Assert Assert.IsNotNull(order); }
public virtual void GetOrder_BadOrderId_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.GetOrder("XBTUSD", null); } catch (Exception) { exceptionThrown = true; } // Assert Assert.IsTrue(exceptionThrown); }