//Console app callup public LearningWebServiceTest(string reportSummaryPath, string reportDetailedPath, LogWriter _writercls, XElement _rootcls, AssertClass _Assertcls) { proxy = new ChannelFactory <ILearningWebService>("Cws.Poc.LearningWebService"); //TODO:Need to updated proxy URI with current enviornment serviceName = proxy.Endpoint.Address.Uri.Segments[proxy.Endpoint.Address.Uri.Segments.Length - 1].Split('.')[0]; target = proxy.CreateChannel(); refreshProxy = new ChannelFactory <IRefreshWebService>("Cws.Poc.RefreshWebService"); refreshService = refreshProxy.CreateChannel(); LogSummaryFile = reportSummaryPath; LogDetailedFile = reportDetailedPath; _writer = _writercls; _Assert = _Assertcls; root = _rootcls; }
public static void MyClassInitialize(TestContext testContext) { if (isLocalRun) { proxy = new ChannelFactory <ILearningWebService>("Cws.Poc.LearningWebService"); serviceName = proxy.Endpoint.Address.Uri.Segments[proxy.Endpoint.Address.Uri.Segments.Length - 1].Split('.')[0]; target = proxy.CreateChannel(); _writer = new LogWriter(); _Assert = new AssertClass(_writer); refreshProxy = new ChannelFactory <IRefreshWebService>("Cws.Poc.RefreshWebService"); refreshService = refreshProxy.CreateChannel(); _writer.CreateXmlFile(LogSummaryFile, "Summary"); _writer.CreateXmlFile(LogDetailedFile, "Detailed"); _writer.LoadLogWriter(LogSummaryFile, LogDetailedFile); root = _writer.create_node("TestCase"); } }