示例#1
0
        public bool test()
        {
            Client2 clientTest = new Client2(false);
            string  Clistr     = "http://localhost:8080/ClientTestIService";
            string  Thstr      = "http://localhost:8080/TestHarnessIService";
            string  Repostr    = "http://localhost:8080/RepoIService";

            clientTest.CreateClientRecvChannel(Clistr);
            // Assuming the Repository has the code to be tested
            clientTest.sendTestRequest(clientTest.buildTestMessage(Clistr, Thstr));
            // Give sufficient time for execution before making the Query
            Thread.Sleep(10000);
            clientTest.makeQuery("test1", Clistr, Repostr);
            while (true)
            {
                Message msg = clientTest.getMessage();
                if (msg.body == "quit")
                {
                    clientTest.Close();
                    clientLog.Append(msg.ToString());
                    break;
                }
                clientLog.Append(msg.ToString());
            }
            return(true);
        }