//<----------------------------------Test Stub for Parser------------------------------------> static void Main() { String xmlReq = MessageTest.makeTestRequest("nikhil"); Parser p = new Parser(); TestRequest tr = p.parse(xmlReq); Console.WriteLine(tr.ToString()); }
public void TestRequestProcessing(Message msg) { lock (obj) { Console.WriteLine("\nChild Thread Created for Test Request (Message number {0}) ------->Requirement 4(Reference: TestHarnessServer.cs Line number 61, 66 and 75)", recvmsgcount); Console.WriteLine("---------------------------------------------------------------------------------------------------------------------------------------------------------------"); Parser parser = new Parser(); TestRequest tr = parser.parse(msg.body); Console.WriteLine("\nTest Request Parsed: \n"); Console.WriteLine("{0}", tr.ToString()); if (tr != null) { List <object> ob = RequestingRepoForDlls(msg, tr); DirectoryInfo d = (DirectoryInfo)ob.ElementAt(0); int filecount = (int)ob.ElementAt(1); Thread.Sleep(1000); while (true) { if (checkFiles) { break; } } if (d.GetFiles().Count() != filecount) { Message errorMsgToClient = makeMessage("TestHarnessServer", msg.to, msg.from, "DLLsNotFound"); Console.WriteLine("Sending Error Message back to Client about the DLLs that were no found ------> Requirement 3(Reference: TestHarnessServer.cs Line Number 118-121"); errorMsgToClient.body = errorFromRepo; comm.sndr.PostMessage(errorMsgToClient); } if (d != null) { //Creating Child AppDomains AppDomainManager adm = new AppDomainManager(); List <Logger> testLogs = adm.CreateChildDomains(d, tr); TestResultReplyToClient(msg, testLogs); } } } }