/// <summary> /// Overrides IAdapter's Initialize method, to set default protocol short name of the testSite. /// </summary> /// <param name="testSite">A parameter represents a ITestSite instance which is used to get/operate current test suite context.</param> public override void Initialize(ITestSite testSite) { base.Initialize(testSite); // Set the protocol name of current test suite testSite.DefaultProtocolDocShortName = "MS-VIEWSS"; // Load Common configuration this.LoadCommonConfiguration(); // Check whether the common properties are valid. Common.CheckCommonProperties(this.Site, true); // Merge the SHOULD MAY config files in the test site. Common.MergeSHOULDMAYConfig(this.Site); // Initialize the proxy. this.viewssProxy = Proxy.CreateProxy <ViewsSoap>(this.Site, false, true, false); // Get target service fully qualified URL this.viewssProxy.Url = Common.GetConfigurationPropertyValue("TargetServiceUrl", this.Site); string userName = Common.GetConfigurationPropertyValue("UserName", this.Site); string password = Common.GetConfigurationPropertyValue("Password", this.Site); string domain = Common.GetConfigurationPropertyValue("Domain", this.Site); this.viewssProxy.Credentials = new NetworkCredential(userName, password, domain); // Set SOAP version according to the configuration file. this.SetSoapVersion(); if (TransportProtocol.HTTPS == Common.GetConfigurationPropertyValue <TransportProtocol>("TransportType", this.Site)) { Common.AcceptServerCertificate(); } // Configure the service timeout. int soapTimeOut = Common.GetConfigurationPropertyValue <int>("ServiceTimeOut", this.Site); // 60000 means the SOAP Timeout in minute. this.viewssProxy.Timeout = soapTimeOut * 60000; }
/// <summary> /// Overrides IAdapter's Initialize method, to set default protocol short name of the testSite. /// </summary> /// <param name="testSite">A parameter represents a ITestSite instance which is used to get/operate current test suite context.</param> public override void Initialize(ITestSite testSite) { base.Initialize(testSite); // Set the protocol name of current test suite testSite.DefaultProtocolDocShortName = "MS-VIEWSS"; // Load Common configuration this.LoadCommonConfiguration(); // Check whether the common properties are valid. Common.CheckCommonProperties(this.Site, true); // Merge the SHOULD MAY config files in the test site. Common.MergeSHOULDMAYConfig(this.Site); // Initialize the proxy. this.viewssProxy = Proxy.CreateProxy<ViewsSoap>(this.Site, false, true, false); // Get target service fully qualified URL this.viewssProxy.Url = Common.GetConfigurationPropertyValue("TargetServiceUrl", this.Site); string userName = Common.GetConfigurationPropertyValue("UserName", this.Site); string password = Common.GetConfigurationPropertyValue("Password", this.Site); string domain = Common.GetConfigurationPropertyValue("Domain", this.Site); this.viewssProxy.Credentials = new NetworkCredential(userName, password, domain); // Set SOAP version according to the configuration file. this.SetSoapVersion(); if (TransportProtocol.HTTPS == Common.GetConfigurationPropertyValue<TransportProtocol>("TransportType", this.Site)) { Common.AcceptServerCertificate(); } // Configure the service timeout. int soapTimeOut = Common.GetConfigurationPropertyValue<int>("ServiceTimeOut", this.Site); // 60000 means the SOAP Timeout in minute. this.viewssProxy.Timeout = soapTimeOut * 60000; }