/// <summary> /// Overrides base Initialize method. /// </summary> /// <param name="testSite">An instance of the ITestSite.</param> public override void Initialize(ITestSite testSite) { base.Initialize(testSite); testSite.DefaultProtocolDocShortName = "MS-DWSS"; this.LoadCommonConfiguration(); // Load SHOULDMAY configuration this.LoadCurrentSutSHOULDMAYConfiguration(); this.dwsService = Proxy.CreateProxy <DwsSoap>(testSite); // Set default Dws service url to site collection. this.dwsService.Url = Common.GetConfigurationPropertyValue("SiteCollection", this.Site); // Set default Dws service credential to admin credential. string userName = Common.GetConfigurationPropertyValue("UserName", this.Site); string password = Common.GetConfigurationPropertyValue("Password", this.Site); string domain = Common.GetConfigurationPropertyValue("Domain", this.Site); this.dwsService.Credentials = new NetworkCredential(userName, password, domain); this.SetSoapVersion(this.dwsService); // When request Url include HTTPS prefix, avoid closing base connection. // Local client will accept all certificates after executing this function. this.transport = Common.GetConfigurationPropertyValue <TransportProtocol>("TransportType", this.Site); if (this.transport == TransportProtocol.HTTPS) { Common.AcceptServerCertificate(); } }
/// <summary> /// Set the SOAP version according to the SoapVersion property. /// </summary> /// <param name="dwsSoap">set meeting proxy</param> private void SetSoapVersion(DwsSoap dwsSoap) { this.soapVersion = Common.GetConfigurationPropertyValue <SoapVersion>("SoapVersion", this.Site); if (this.soapVersion == SoapVersion.SOAP11) { dwsSoap.SoapVersion = SoapProtocolVersion.Soap11; } else if (this.soapVersion == SoapVersion.SOAP12) { dwsSoap.SoapVersion = SoapProtocolVersion.Soap12; } else { Site.Assume.Fail( "Property SoapVersion value must be {0} or {1} at the ptfconfig file.", SoapVersion.SOAP11.ToString(), SoapVersion.SOAP12.ToString()); } }
/// <summary> /// Overrides base Initialize method. /// </summary> /// <param name="testSite">An instance of the ITestSite.</param> public override void Initialize(ITestSite testSite) { base.Initialize(testSite); testSite.DefaultProtocolDocShortName = "MS-DWSS"; this.LoadCommonConfiguration(); // Load SHOULDMAY configuration this.LoadCurrentSutSHOULDMAYConfiguration(); this.dwsService = Proxy.CreateProxy<DwsSoap>(testSite); // Set default Dws service url to site collection. this.dwsService.Url = Common.GetConfigurationPropertyValue("SiteCollection", this.Site); // Set default Dws service credential to admin credential. string userName = Common.GetConfigurationPropertyValue("UserName", this.Site); string password = Common.GetConfigurationPropertyValue("Password", this.Site); string domain = Common.GetConfigurationPropertyValue("Domain", this.Site); this.dwsService.Credentials = new NetworkCredential(userName, password, domain); this.SetSoapVersion(this.dwsService); // When request Url include HTTPS prefix, avoid closing base connection. // Local client will accept all certificates after executing this function. this.transport = Common.GetConfigurationPropertyValue<TransportProtocol>("TransportType", this.Site); if (this.transport == TransportProtocol.HTTPS) { Common.AcceptServerCertificate(); } }
/// <summary> /// Set the SOAP version according to the SoapVersion property. /// </summary> /// <param name="dwsSoap">set meeting proxy</param> private void SetSoapVersion(DwsSoap dwsSoap) { this.soapVersion = Common.GetConfigurationPropertyValue<SoapVersion>("SoapVersion", this.Site); if (this.soapVersion == SoapVersion.SOAP11) { dwsSoap.SoapVersion = SoapProtocolVersion.Soap11; } else if (this.soapVersion == SoapVersion.SOAP12) { dwsSoap.SoapVersion = SoapProtocolVersion.Soap12; } else { Site.Assume.Fail( "Property SoapVersion value must be {0} or {1} at the ptfconfig file.", SoapVersion.SOAP11.ToString(), SoapVersion.SOAP12.ToString()); } }