static void Main(string[] args) { testHarness th = new testHarness(""); th.startRemote(); #if (TEST_TESTHARNESS) CommandData cmd = new CommandData(); cmd.from = "localhost"; cmd.to = "localhost"; cmd.testAuthor = "me"; cmd.testName = "test"; cmd.command = "Test"; DateTime tm = new DateTime(2016, 11, 20, 09, 00, 00); cmd.dateTime = tm.ToString("MM_dd_yyyy_hh_mm_ss"); cmd.url = "http://localhost:8082/"; cmd.dllFiles.Add("tc1.dll"); cmd.dllFiles.Add("tc2.dll"); cmd.dllFiles.Add("td1.dll"); cmd.dllFiles.Add("td2.dll"); cmd.xmlFile = "XMLFile1.xml"; try { stringSender sndr = new stringSender("http://localhost:8080/THStrRcvr"); CommandEncoder cmdEnocoder = new CommandEncoder(cmd); sndr.PostMessage(cmdEnocoder.encode()); cmd.testAuthor = "me1"; cmdEnocoder = new CommandEncoder(cmd); sndr.PostMessage(cmdEnocoder.encode()); } catch (Exception ex) { Console.WriteLine(ex.ToString()); } #endif }
void connectToListener(string endpoint) { try { //string endpoint = "http://localhost:8080/IStringCommunicator"; sndr = new stringSender(endpoint); } catch (Exception ex) { Console.WriteLine(ex.ToString()); } }
void caseFileNotMatch(CommandData cmdData) { cmdData.from = "th"; cmdData.to = "client"; //then we send it to the client try { sndr = new stringSender(cmdData.url + "/CStrRcvr"); CommandEncoder cmdEnocoder = new CommandEncoder(cmdData); sndr.PostMessage(cmdEnocoder.encode()); } catch (Exception ex) { Console.WriteLine(ex.ToString()); } }
void caseTest(CommandData cmdData) { cmdData.command = "Request File"; cmdData.from = url; cmdData.to = Repourl; //then we send it to the repository try { //string endpoint = "http://localhost:8080/IStringCommunicator"; sndr = new stringSender(RepoStrRcvr); CommandEncoder cmdEnocoder = new CommandEncoder(cmdData); sndr.PostMessage(cmdEnocoder.encode()); } catch (Exception ex) { Console.WriteLine(ex.ToString()); } }