Exemplo n.º 1
0
 public CountryLookupServiceTest(string reportSummaryPath, string reportDetailedPath, LogWriter _writercls, XElement _rootcls, AssertClass _Assertcls)
 {
     proxy           = new ChannelFactory <ICountryLookupWebService>("Cws.Poc.CountryLookupWebService");
     serviceName     = proxy.Endpoint.Address.Uri.Segments[proxy.Endpoint.Address.Uri.Segments.Length - 1].Split('.')[0];
     target          = proxy.CreateChannel();
     LogSummaryFile  = reportSummaryPath;
     LogDetailedFile = reportDetailedPath;
     _writer         = _writercls;
     _Assert         = _Assertcls;
     //_writer.CreateXmlFile(LogSummaryFile, "Summary");
     //_writer.CreateXmlFile(LogDetailedFile, "Detailed");
     //_writer.LoadLogWriter(LogSummaryFile, LogDetailedFile);
     root = _rootcls;
 }
Exemplo n.º 2
0
        //Values initialize with default consructor
        public CountryLookupServiceTest()
        {
            proxy       = new ChannelFactory <ICountryLookupWebService>("Cws.Poc.CountryLookupWebService");
            serviceName = proxy.Endpoint.Address.Uri.Segments[proxy.Endpoint.Address.Uri.Segments.Length - 1].Split('.')[0];
            target      = proxy.CreateChannel();
            //_writer.CreateXmlFile(LogSummaryFile, "Summary");
            //_writer.CreateXmlFile(LogDetailedFile, "Detailed");
            //_writer.LoadLogWriter(LogSummaryFile, LogDetailedFile);
            //root = _writer.create_node("TestCase");
            // proxy = new ChannelFactory<ICountryLookupWebService>("Cws.Poc.CountryLookupWebService");
            // target = proxy.CreateChannel();
            //_Assert = new AssertClass(_writer);

            //_writer.CreateXmlFile(LogSummaryFile, "Summary");
            //_writer.CreateXmlFile(LogDetailedFile, "Detailed");
            //_writer.LoadLogWriter(LogSummaryFile, LogDetailedFile);
            //root = _writer.create_node("TestCase");
        }
Exemplo n.º 3
0
 public static void MyClassInitialize(TestContext testContext)
 {
     if (isLocalRun)
     {
         proxy           = new ChannelFactory <ICountryLookupWebService>("Cws.Poc.CountryLookupWebService");
         serviceName     = proxy.Endpoint.Address.Uri.Segments[proxy.Endpoint.Address.Uri.Segments.Length - 1].Split('.')[0];
         target          = proxy.CreateChannel();
         LogSummaryFile  = filePath + DateTime.Now.ToShortDateString().Replace("/", "") + DateTime.Now.ToLongTimeString().Replace(":", "") + "Summary.xml";
         LogDetailedFile = filePath + DateTime.Now.ToShortDateString().Replace("/", "") + DateTime.Now.ToLongTimeString().Replace(":", "") + "Detailed.xml";
         _writer         = new LogWriter();
         _Assert         = new AssertClass(_writer);
         _writer.CreateXmlFile(LogSummaryFile, "Summary");
         _writer.CreateXmlFile(LogDetailedFile, "Detailed");
         _writer.LoadLogWriter(LogSummaryFile, LogDetailedFile);
         root = _writer.create_node("TestCase");
     }
     //_writer = new LogWriter();
     //_Assert = new AssertClass(_writer);
     //_writer.CreateXmlFile(LogSummaryFile, "Summary");
     //_writer.CreateXmlFile(LogDetailedFile, "Detailed");
     //_writer.LoadLogWriter(LogSummaryFile, LogDetailedFile);
     //root = _writer.create_node("TestCase");
 }