Exemplo n.º 1
0
        public void Server_Unknown_Command()
        {
            String test_command = "test";
            String test_User    = "******";
            String result       = ConnectServer.AddCommand(test_command, test_User);

            Assert.AreEqual("Unknown command: (" + test_command + ") \n Please try again.", result);
        }
Exemplo n.º 2
0
        public void Server_GetHealth_Command()
        {
            String test_command = "GetHealth";
            String test_User    = "******";
            String result       = ConnectServer.AddCommand(test_command, test_User);

            Assert.AreEqual("Current health: 100", result);
        }
Exemplo n.º 3
0
        public void Server_GetEnergy_Command()
        {
            String test_command = "GetEnergy";
            String test_User    = "******";
            String result       = ConnectServer.AddCommand(test_command, test_User);

            Assert.AreEqual("Current energy: 100", result);
        }
Exemplo n.º 4
0
        public void Server_AddCommand() //also acts as a test for the exit command
        {
            String test_command = "exit";
            String test_User    = "******";
            String result       = ConnectServer.AddCommand(test_command, test_User);

            Assert.AreEqual("Quitting game!", result);
        }