예제 #1
0
        public virtual void GetMargin_NotAuthenticated_ShouldThrowException()
        {
            bool exceptionThrown = false;

            // Arrange
            BitmexAPI exchange = new BitmexAPI(new BitmexAPIStub());

            // Act (one single action only)
            try { exchange.GetMargin(); } catch (Exception) { exceptionThrown = true; }

            // Assert
            Assert.IsTrue(exceptionThrown);
        }
예제 #2
0
        public virtual void GetMargin_ShouldSuccess()
        {
            // Arrange
            BitmexAPI exchange = new BitmexAPI(new BitmexAPIStub());

            exchange.SetKeys("some_dummy_key", "some_dummy_secret");

            // Act (one single action only)
            Margin margin = exchange.GetMargin();

            // Assert
            Assert.IsNotNull(margin);
        }