Esempio n. 1
0
        public async Task CloseUserDataStream_NullListenKey_Throws()
        {
            // Arrange

            // Act

            // Assert
            await Assert.ThrowsAsync <ArgumentNullException>(async() => await ConcreteBinanceClient.CloseUserDataStream(null));
        }
Esempio n. 2
0
        public async Task CloseUserDataStream_ValidListenKey_CallsProcessPutRequest()
        {
            // Arrange
            var listenKey = "listenKey";

            // Act
            await ConcreteBinanceClient.CloseUserDataStream(listenKey);

            // Assert
            MockAPIProcessor.Verify(a => a.ProcessDeleteRequest <UserDataStreamResponse>(
                                        It.Is <BinanceEndpointData>(u => u.Uri.Equals(Endpoints.UserStream.CloseUserDataStream(listenKey).Uri)),
                                        5000),
                                    Times.Once()
                                    );
        }