예제 #1
0
        public void RCONLongGoldSrcServer()
        {
            GoldSrcServer server = new GoldSrcServer(goldSrcServerAddress, goldSrcServerPort);

            server.Socket.Timeout = goldSrcServerTimeout;
            server.RconAuth(goldSrcServerAuth);

            string rconReply = server.RconExec("cvarlist");

            Assert.IsTrue(rconReply.Contains("CvarList ? for syntax"),
                          "Did not receive complete cvarlist.");
        }
예제 #2
0
        public void RCONShortGoldSrcServer()
        {
            GoldSrcServer server = new GoldSrcServer(goldSrcServerAddress, goldSrcServerPort);

            server.Socket.Timeout = goldSrcServerTimeout;
            server.RconAuth(sourceServerAuth);

            string rconReply = server.RconExec("version");

            Assert.IsTrue(rconReply.Contains("Protocol version") &&
                          rconReply.Contains("Exe version") &&
                          rconReply.Contains("Exe build"),
                          "Did not receive correct version response.");
        }
예제 #3
0
        public void InvalidGoldSrcServer()
        {
            GoldSrcServer server = new GoldSrcServer("10.0.0.1");

            Assert.AreEqual(server.Ping, -1, "Exception should have been thrown");
        }