/// <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-SHDACCWS"; // Merge the common configuration into local configuration string conmmonConfigFileName = Common.GetConfigurationPropertyValue("CommonConfigurationFileName", this.Site); Common.MergeGlobalConfig(conmmonConfigFileName, this.Site); Common.CheckCommonProperties(this.Site, true); // Load SHOULDMAY configuration Common.MergeSHOULDMAYConfig(this.Site); // Initialize the proxy. this.service = Proxy.CreateProxy <SharedAccessSoap>(this.Site, true, true, false); this.service.Url = this.GetTargetServiceUrl(); string userName = Common.GetConfigurationPropertyValue("UserName", this.Site); string password = Common.GetConfigurationPropertyValue("Password", this.Site); string domain = Common.GetConfigurationPropertyValue("Domain", this.Site); this.service.Credentials = new NetworkCredential(userName, password, domain); 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 configure SOAP Timeout is in minute. this.service.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-SHDACCWS"; // Merge the common configuration into local configuration string conmmonConfigFileName = Common.GetConfigurationPropertyValue("CommonConfigurationFileName", this.Site); Common.MergeGlobalConfig(conmmonConfigFileName, this.Site); Common.CheckCommonProperties(this.Site, true); // Load SHOULDMAY configuration Common.MergeSHOULDMAYConfig(this.Site); // Initialize the proxy. this.service = Proxy.CreateProxy<SharedAccessSoap>(this.Site, true, true, false); this.service.Url = this.GetTargetServiceUrl(); string userName = Common.GetConfigurationPropertyValue("UserName", this.Site); string password = Common.GetConfigurationPropertyValue("Password", this.Site); string domain = Common.GetConfigurationPropertyValue("Domain", this.Site); this.service.Credentials = new NetworkCredential(userName, password, domain); 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 configure SOAP Timeout is in minute. this.service.Timeout = soapTimeOut * 60000; }