예제 #1
0
        public async Task MultiPacketResponseShouldBeCorrectlyReceivedFromStrictRCONServers()
        {
            // Arrange
            var channel    = new SourceChannel();
            var rconClient = RconClient.Create(channel);
            await rconClient.ConnectAsync();

            // Act
            var response = await rconClient.ExecuteCommandAsync("print all", true);

            // Assert
            Assert.Equal("This will be a very long message", response);
        }
예제 #2
0
        public async Task AuthenticateShouldWorkOnStrictRCONServers(string password, bool isAuthenticated)
        {
            // Arrange
            var channel    = new SourceChannel();
            var rconClient = RconClient.Create(channel);
            await rconClient.ConnectAsync();

            // Act
            var response = await rconClient.AuthenticateAsync(password);

            // Assert
            Assert.Equal(isAuthenticated, response);
        }