Beispiel #1
0
        public async Task UserStreamCloseThrows()
        {
            var          user      = new BinanceApiUser("api-key");
            const string listenKey = "listen-key";

            await Assert.ThrowsAsync <ArgumentNullException>("user", () => _client.UserStreamCloseAsync((IBinanceApiUser)null, listenKey));

            await Assert.ThrowsAsync <ArgumentNullException>("apiKey", () => _client.UserStreamCloseAsync((string)null, listenKey));

            await Assert.ThrowsAsync <ArgumentNullException>("listenKey", () => _client.UserStreamCloseAsync(user, null));

            await Assert.ThrowsAsync <ArgumentNullException>("listenKey", () => _client.UserStreamCloseAsync(user, string.Empty));
        }