public void BinancePostOrders_ShouldReturnBinanceOrder() { //Arrange _httpMessageHandlerMock .Protected() .Setup <Task <HttpResponseMessage> >("SendAsync", ItExpr.Is <HttpRequestMessage>(x => x.RequestUri.AbsoluteUri.Contains("/api/v1/time")), ItExpr.IsAny <CancellationToken>()) .Returns(Task.FromResult(new HttpResponseMessage(HttpStatusCode.OK) { StatusCode = HttpStatusCode.OK, Content = new StringContent( $@"{{""serverTime"":1592395836992}}") })) .Verifiable(); _httpMessageHandlerMock .Protected() .Setup <Task <HttpResponseMessage> >("SendAsync", ItExpr.Is <HttpRequestMessage>(x => x.RequestUri.AbsoluteUri.Contains("/api/v3/order")), ItExpr.IsAny <CancellationToken>()) .Returns(Task.FromResult(new HttpResponseMessage(HttpStatusCode.OK) { StatusCode = HttpStatusCode.OK, Content = new StringContent( $@"{{""symbol"":""BNBBTC"",""orderId"":156, ""orderListId"":-1,""clientOrderId"":""Ovu4oRzIuBmzR7YKnZjQDg"", ""transactTime"":1594418218604,""price"":""0.00000000"",""origQty"":""0.10000000"", ""executedQty"":""0.10000000"",""cummulativeQuoteQty"":""0.00016933"", ""status"":""FILLED"",""timeInForce"":""GTC"",""type"":""MARKET"", ""side"":""BUY"",""fills"":[{{""price"":""0.00169330"",""qty"":""0.10000000"", ""commission"":""0.00000000"",""commissionAsset"":""BNB"",""tradeId"":72}}]}}") })) .Verifiable(); HttpClient httpClient = new HttpClient(_httpMessageHandlerMock.Object); ConnectionAdapter connectionFactory = new ConnectionAdapter(httpClient, _exchangeSettings); Binance subjectUnderTest = new Binance(connectionFactory); BinanceOrder binanceOrder = new BinanceOrder(); binanceOrder.OrderType = OrderType.Market; binanceOrder.OrderSide = OrderSide.Buy; binanceOrder.OrderSize = (decimal)0.1; binanceOrder.Symbol = "BNBBTC"; //Act BinanceOrder binanceOrderResult = subjectUnderTest.BinancePostOrdersAsync(binanceOrder).Result; //Assert Assert.IsNotNull(binanceOrderResult); }