/// <summary> /// Overrides IAdapter's Initialize(), to set testSite.DefaultProtocolDocShortName. /// </summary> /// <param name="testSite">Transfer ITestSite into adapter,Make adapter can use ITestSite's function.</param> public override void Initialize(ITestSite testSite) { base.Initialize(testSite); testSite.DefaultProtocolDocShortName = "MS-OFFICIALFILE"; // Get the name of common configuration file. string commonConfigFileName = Common.Common.GetConfigurationPropertyValue("CommonConfigurationFileName", this.Site); // Merge the common configuration. Common.Common.MergeGlobalConfig(commonConfigFileName, this.Site); // Merge the Should/May configuration. Common.Common.MergeSHOULDMAYConfig(this.Site); // Initialize the OfficialFileSoap. this.officialfileService = Common.Proxy.CreateProxy <OfficialFileSoap>(testSite, true, true); AdapterHelper.Initialize(testSite); // Set the transportType. TransportType transportType = Common.Common.GetConfigurationPropertyValue <TransportType>("TransportType", this.Site); // Case request URl include HTTPS prefix, use this function to avoid closing base connection. // Local client will accept all certificate after execute this function. if (transportType == TransportType.HTTPS) { AdapterHelper.AcceptAllCertificate(); } // Set the version of the SOAP protocol used to make the SOAP request to the web service this.officialfileService.SoapVersion = Common.Common.GetConfigurationPropertyValue <SoapProtocolVersion>("SoapVersion", this.Site); }
/// <summary> /// Overrides IAdapter's Initialize(), to set testSite.DefaultProtocolDocShortName. /// </summary> /// <param name="testSite">Transfer ITestSite into adapter,Make adapter can use ITestSite's function.</param> public override void Initialize(ITestSite testSite) { base.Initialize(testSite); testSite.DefaultProtocolDocShortName = "MS-OFFICIALFILE"; // Get the name of common configuration file. string commonConfigFileName = Common.Common.GetConfigurationPropertyValue("CommonConfigurationFileName", this.Site); // Merge the common configuration. Common.Common.MergeGlobalConfig(commonConfigFileName, this.Site); // Merge the Should/May configuration. Common.Common.MergeSHOULDMAYConfig(this.Site); // Initialize the OfficialFileSoap. this.officialfileService = Common.Proxy.CreateProxy<OfficialFileSoap>(testSite, true, true); AdapterHelper.Initialize(testSite); // Set the transportType. TransportType transportType = Common.Common.GetConfigurationPropertyValue<TransportType>("TransportType", this.Site); // Case request URl include HTTPS prefix, use this function to avoid closing base connection. // Local client will accept all certificate after execute this function. if (transportType == TransportType.HTTPS) { AdapterHelper.AcceptAllCertificate(); } // Set the version of the SOAP protocol used to make the SOAP request to the web service this.officialfileService.SoapVersion = Common.Common.GetConfigurationPropertyValue<SoapProtocolVersion>("SoapVersion", this.Site); }