コード例 #1
0
        public virtual void AmendOrder_NotAuthenticated_ShouldThrowException()
        {
            bool exceptionThrown = false;

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

            // Act (one single action only)
            try { exchange.AmendOrder("some_order_id", 200); } catch (Exception) { exceptionThrown = true; }

            // Assert
            Assert.IsTrue(exceptionThrown);
        }
コード例 #2
0
        public virtual void AmendOrder_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.AmendOrder(null, 200); } catch (Exception) { exceptionThrown = true; }

            // Assert
            Assert.IsTrue(exceptionThrown);
        }
コード例 #3
0
        public virtual void AmendOrder_ShouldSuccess()
        {
            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.AmendOrder("some_order_id", 200); } catch { exceptionThrown = true; }

            // Assert
            Assert.IsFalse(exceptionThrown);
        }