예제 #1
0
        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);
        }
예제 #2
0
        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);
        }