示例#1
0
        //Console app callup
        public SBWSCommon(string reportSummaryPath, string reportDetailedPath, LogWriter _writercls, XElement _rootcls, AssertClass _Assertcls)
        {
            proxy       = new ChannelFactory <IRegistrationWebService>("Cws.Poc.RegistrationWebService");
            serviceName = proxy.Endpoint.Address.Uri.Segments[proxy.Endpoint.Address.Uri.Segments.Length - 1].Split('.')[0];

            target          = proxy.CreateChannel();
            proxy2          = new ChannelFactory <IAccountWebService>("Cws.Poc.AccountWebService");
            target2         = proxy2.CreateChannel();
            proxy1          = new ChannelFactory <IUserEntitlementWebService>("Cws.Poc.UserEntitlementWebService");
            target1         = proxy1.CreateChannel();
            proxy3          = new ChannelFactory <IAccountDomainWebService>("Cws.Poc.AccountDomainWebService");
            target3         = proxy3.CreateChannel();
            proxy4          = new ChannelFactory <IUserProfileWebService>("Cws.Poc.UserProfileWebService");
            target4         = proxy4.CreateChannel();
            proxy5          = new ChannelFactory <IAuthenticationWebService>("Cws.Poc.AuthenticationWebService1");
            target5         = proxy5.CreateChannel();
            proxy6          = new ChannelFactory <ILoginWebService>("Cws.Poc.LoginWebService1");
            target6         = proxy6.CreateChannel();
            refreshProxy    = new ChannelFactory <IRefreshWebService>("Cws.Poc.RefreshWebService");
            refreshService  = refreshProxy.CreateChannel();
            LogSummaryFile  = reportSummaryPath;
            LogDetailedFile = reportDetailedPath;
            _writer         = _writercls;
            _Assert         = _Assertcls;
            //SBWSCommon.EnvironmentLevel = ConfigurationManager.AppSettings["ExecutionEnvironment"];
            //_writer.CreateXmlFile(LogSummaryFile, "Summary");
            //_writer.CreateXmlFile(LogDetailedFile, "Detailed");
            //_writer.LoadLogWriter(LogSummaryFile, LogDetailedFile);
            root = _rootcls;
        }
示例#2
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;
 }
 //Console app callup
 public RefreshWebserviceTest(string reportSummaryPath, string reportDetailedPath, LogWriter _writercls, XElement _rootcls, AssertClass _Assertcls)
 {
     proxy           = new ChannelFactory <IUserProfileWebService>("Cws.Poc.UserProfileWebService");
     target          = proxy.CreateChannel();
     refreshProxy    = new ChannelFactory <IRefreshWebService>("Cws.Poc.RefreshWebService");
     serviceName     = refreshProxy.Endpoint.Address.Uri.Segments[refreshProxy.Endpoint.Address.Uri.Segments.Length - 1].Split('.')[0];
     Target          = refreshProxy.CreateChannel();
     LogSummaryFile  = reportSummaryPath;
     LogDetailedFile = reportDetailedPath;
     _writer         = _writercls;
     _Assert         = _Assertcls;
     root            = _rootcls;
     // objSBWSCommon = new SBWSCommon(LogSummaryFile, LogDetailedFile, _writer, root, _Assert);
     // objRWS = new RegistrationServiceTests(LogSummaryFile, LogDetailedFile, _writer, root, _Assert);
 }
示例#4
0
        //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;
        }
示例#5
0
 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");
     }
 }
示例#6
0
        public static void MyClassInitialize(TestContext testContext)
        {
            if (isLocalRun)
            {
                proxy           = new ChannelFactory <IRegistrationWebService>("Cws.Poc.RegistrationWebService");
                target          = proxy.CreateChannel();
                proxy2          = new ChannelFactory <IAccountWebService>("Cws.Poc.AccountWebService");
                target2         = proxy2.CreateChannel();
                proxy1          = new ChannelFactory <IUserEntitlementWebService>("Cws.Poc.UserEntitlementWebService");
                target1         = proxy1.CreateChannel();
                proxy3          = new ChannelFactory <IAccountDomainWebService>("Cws.Poc.AccountDomainWebService");
                target3         = proxy3.CreateChannel();
                proxy4          = new ChannelFactory <IUserProfileWebService>("Cws.Poc.UserProfileWebService");
                target4         = proxy4.CreateChannel();
                proxy5          = new ChannelFactory <IAuthenticationWebService>("Cws.Poc.AuthenticationWebService1");
                target5         = proxy5.CreateChannel();
                proxy6          = new ChannelFactory <ILoginWebService>("Cws.Poc.LoginWebService1");
                target6         = proxy6.CreateChannel();
                refreshProxy    = new ChannelFactory <IRefreshWebService>("Cws.Poc.RefreshWebService");
                refreshService  = refreshProxy.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();
            //_writer.CreateXmlFile(LogSummaryFile, "Summary");
            //_writer.CreateXmlFile(LogDetailedFile, "Detailed");
            //_writer.LoadLogWriter(LogSummaryFile, LogDetailedFile);


            //root = _writer.create_node("TestCase");
        }
示例#7
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");
 }