Ejemplo n.º 1
0
        public virtual void GetTicker_ShouldSuccess()
        {
            // Arrange
            OkexTokenAPI exchange = new OkexTokenAPI(new OkexTokenAPIStub());

            // Act (one single action only)
            Ticker ticker = exchange.GetTicker("BTC-USDT");

            // Assert
            Assert.IsNotNull(ticker);
        }
Ejemplo n.º 2
0
        public virtual void GetTicker_BadSymbol_ShouldThrowException()
        {
            bool exceptionThrown = false;

            // Arrange
            OkexTokenAPI exchange = new OkexTokenAPI(new OkexTokenAPIStub());

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

            // Assert
            Assert.IsTrue(exceptionThrown);
        }