public static GenerateUrlPrefixWithPortNumber ( ) : string | ||
return | string |
public void MSADMINS_S02_TC10_CreateSiteFailed_WebTemplateInvalid() { bool isSoapFaultReturn = false; // Call GetLanguages method to obtain LCID values used in the protocol server deployment. GetLanguagesResponseGetLanguagesResult lcids = this.adminsAdapter.GetLanguages(); Site.Assert.IsNotNull(lcids, "Get languages should succeed and a list of LCIDs should return. If no LCID returns the get languages method is failed."); int lcid = lcids.Languages[0]; string title = TestSuiteBase.GenerateUniqueSiteTitle(); string url = TestSuiteBase.GenerateUrlPrefixWithPortNumber() + title; string description = TestSuiteBase.GenerateRandomString(20); string webTemplateInvalid = TestSuiteBase.GenerateRandomString(5); string ownerLogin = Common.GetConfigurationPropertyValue("OwnerLogin", this.Site); string ownerName = TestSuiteBase.GenerateUniqueOwnerName(); string ownerEmail = TestSuiteBase.GenerateEmail(20); string portalUrl = TestSuiteBase.GeneratePortalUrl(20); string portalName = TestSuiteBase.GenerateUniquePortalName(); try { // Call CreateSite method to create a site collection with invalid WebTemplate. this.adminsAdapter.CreateSite(url, title, description, lcid, webTemplateInvalid, ownerLogin, ownerName, ownerEmail, portalUrl, portalName); } catch (SoapException) { isSoapFaultReturn = true; } // If a SOAP fault is returned, then MS-ADMINS_R19 can be captured. Site.CaptureRequirementIfIsTrue( isSoapFaultReturn, 19, @"[In CreateSiteSoapIn]If WebTemplate is not empty, and if it is not available in the list of templates and it is not a custom template, then the server MUST return a SOAP fault."); }
public void MSADMINS_S02_TC13_CreateSiteFailed_OwnerLoginEmpty() { // Call GetLanguages method to obtain LCID values used in the protocol server deployment. GetLanguagesResponseGetLanguagesResult lcids = this.adminsAdapter.GetLanguages(); Site.Assert.IsNotNull(lcids, "Get languages should succeed and a list of LCIDs should return. If no LCID returns the get languages method is failed."); int lcid = lcids.Languages[0]; string title = TestSuiteBase.GenerateUniqueSiteTitle(); string url = TestSuiteBase.GenerateUrlPrefixWithPortNumber() + title; string description = TestSuiteBase.GenerateRandomString(20); string webTemplate = Common.GetConfigurationPropertyValue("CustomizedTemplate", this.Site); string ownerLoginEmpty = string.Empty; string ownerName = TestSuiteBase.GenerateUniqueOwnerName(); string ownerEmail = TestSuiteBase.GenerateEmail(20); string portalUrl = TestSuiteBase.GeneratePortalUrl(20); string portalName = TestSuiteBase.GenerateUniquePortalName(); try { // Call CreateSite to create a site collection with empty ownerLogin. string result = this.adminsAdapter.CreateSite(url, title, description, lcid, webTemplate, ownerLoginEmpty, ownerName, ownerEmail, portalUrl, portalName); Site.Assert.IsFalse(Uri.IsWellFormedUriString(result, UriKind.Absolute), "Create site operation should fail."); } catch (SoapException) { Site.Log.Add(LogEntryKind.Debug, "Create site operation should fail with empty OwnerLogin."); } }
public void MSADMINS_S02_TC09_CreateSiteFailed_LcidInvalid() { string strErrorCode = string.Empty; int invalidLcid = TestSuiteBase.GenerateRandomNumber(0, 99); string title = TestSuiteBase.GenerateUniqueSiteTitle(); string url = TestSuiteBase.GenerateUrlPrefixWithPortNumber() + title; string description = TestSuiteBase.GenerateRandomString(20); string webTemplate = Common.GetConfigurationPropertyValue("CustomizedTemplate", this.Site); string ownerLogin = Common.GetConfigurationPropertyValue("OwnerLogin", this.Site); string ownerName = TestSuiteBase.GenerateUniqueOwnerName(); string ownerEmail = TestSuiteBase.GenerateEmail(20); string portalUrl = TestSuiteBase.GeneratePortalUrl(20); string portalName = TestSuiteBase.GenerateUniquePortalName(); try { // Call CreateSite to create a site collection with an invalid LCID. this.adminsAdapter.CreateSite(url, title, description, invalidLcid, webTemplate, ownerLogin, ownerName, ownerEmail, portalUrl, portalName); } catch (SoapException exp) { strErrorCode = Common.ExtractErrorCodeFromSoapFault(exp); Site.Log.Add(LogEntryKind.Debug, "Soap exception returned, it means the create site operation failed with invalid LCID inputting, the message is: {0}", exp.Message); } // If the returned error code equals to 0x8102005e, then MS-ADMINS_R18 can be captured. Site.CaptureRequirementIfAreEqual <string>( "0x8102005e", strErrorCode, 18, @"[In CreateSiteSoapIn] If the LCID is invalid [or not installed], then the server MUST return a SOAP fault with error code 0x8102005e."); }
public void MSADMINS_S02_TC08_CreateSiteFailed_LcidNotInstalled() { string strErrorCode = string.Empty; int notInstalledLcid = int.Parse(Common.GetConfigurationPropertyValue("NotInstalledLCID", this.Site)); string title = TestSuiteBase.GenerateUniqueSiteTitle(); string url = TestSuiteBase.GenerateUrlPrefixWithPortNumber() + title; string description = TestSuiteBase.GenerateRandomString(20); string webTemplate = Common.GetConfigurationPropertyValue("CustomizedTemplate", this.Site); string ownerLogin = Common.GetConfigurationPropertyValue("OwnerLogin", this.Site); string ownerName = TestSuiteBase.GenerateUniqueOwnerName(); string ownerEmail = TestSuiteBase.GenerateEmail(20); string portalUrl = TestSuiteBase.GeneratePortalUrl(20); string portalName = TestSuiteBase.GenerateUniquePortalName(); try { // Call CreateSite method to create a site collection with a not installed LCID. this.adminsAdapter.CreateSite(url, title, description, notInstalledLcid, webTemplate, ownerLogin, ownerName, ownerEmail, portalUrl, portalName); } catch (SoapException exp) { strErrorCode = Common.ExtractErrorCodeFromSoapFault(exp); } // If the returned error code equals to 0x8102005e, then MS-ADMINS_R18 can be captured. Site.CaptureRequirementIfAreEqual <string>( "0x8102005e", strErrorCode, 18002, @"[In CreateSiteSoapIn] If the LCID is invalid [or not installed], then the server MUST return a SOAP fault with error code 0x8102005e."); }
public void MSADMINS_S02_TC12_CreateSiteFailed_OwnerLoginAbsent() { bool isSoapFaultReturn = false; // Call GetLanguages method to obtain LCID values used in the protocol server deployment. GetLanguagesResponseGetLanguagesResult lcids = this.adminsAdapter.GetLanguages(); Site.Assert.IsNotNull(lcids, "Get languages should succeed and a list of LCIDs should return. If no LCID returns the get languages method is failed."); int lcid = lcids.Languages[0]; string title = TestSuiteBase.GenerateUniqueSiteTitle(); string url = TestSuiteBase.GenerateUrlPrefixWithPortNumber() + title; string description = TestSuiteBase.GenerateRandomString(20); string webTemplate = Common.GetConfigurationPropertyValue("CustomizedTemplate", this.Site); string ownerName = TestSuiteBase.GenerateUniqueOwnerName(); string ownerEmail = TestSuiteBase.GenerateEmail(20); string portalUrl = TestSuiteBase.GeneratePortalUrl(20); string portalName = TestSuiteBase.GenerateUniquePortalName(); try { // Call CreateSite method to create a site collection without owner login. this.adminsAdapter.CreateSite(url, title, description, lcid, webTemplate, null, ownerName, ownerEmail, portalUrl, portalName); } catch (SoapException) { isSoapFaultReturn = true; } // If a SOAP fault is returned, then MS-ADMINS_R2050 can be captured. Site.CaptureRequirementIfIsTrue( isSoapFaultReturn, 2050, @"[In CreateSite]If it[OwnerLogin] is missing, the server MUST return a SOAP fault."); isSoapFaultReturn = false; try { // Call CreateSite method to create a site collection with empty owner login. this.adminsAdapter.CreateSite(url, title, description, lcid, webTemplate, string.Empty, ownerName, ownerEmail, portalUrl, portalName); } catch (SoapException) { isSoapFaultReturn = true; } // If a SOAP fault is returned, then MS-ADMINS_R2050 can be captured. Site.CaptureRequirementIfIsTrue( isSoapFaultReturn, 2050001, @"[In CreateSite]If it[OwnerLogin] is empty, the server MUST return a SOAP fault."); }
public void MSADMINS_S02_TC09_CreateSiteFailed_LcidInvalid() { int invalidLcid = TestSuiteBase.GenerateRandomNumber(0, 99); string title = TestSuiteBase.GenerateUniqueSiteTitle(); string url = TestSuiteBase.GenerateUrlPrefixWithPortNumber() + title; string description = TestSuiteBase.GenerateRandomString(20); string webTemplate = Common.GetConfigurationPropertyValue("CustomizedTemplate", this.Site); string ownerLogin = Common.GetConfigurationPropertyValue("OwnerLogin", this.Site); string ownerName = TestSuiteBase.GenerateUniqueOwnerName(); string ownerEmail = TestSuiteBase.GenerateEmail(20); string portalUrl = TestSuiteBase.GeneratePortalUrl(20); string portalName = TestSuiteBase.GenerateUniquePortalName(); try { // Call CreateSite to create a site collection with an invalid LCID. this.adminsAdapter.CreateSite(url, title, description, invalidLcid, webTemplate, ownerLogin, ownerName, ownerEmail, portalUrl, portalName); } catch (SoapException exp) { Site.Log.Add(LogEntryKind.Debug, "Soap exception returned, it means the create site operation failed with invalid LCID inputting, the message is: {0}", exp.Message); } }
public void MSADMINS_S02_TC11_CreateSiteFailed_OwnerLoginAccountNotExisted() { string strErrorCode = string.Empty; // Call GetLanguages method to obtain LCID values used in the protocol server deployment. GetLanguagesResponseGetLanguagesResult lcids = this.adminsAdapter.GetLanguages(); Site.Assert.IsNotNull(lcids, "Get languages should succeed and a list of LCIDs should return. If no LCID returns the get languages method is failed."); int lcid = lcids.Languages[0]; string title = TestSuiteBase.GenerateUniqueSiteTitle(); string url = TestSuiteBase.GenerateUrlPrefixWithPortNumber() + title; string description = TestSuiteBase.GenerateRandomString(20); string webTemplate = Common.GetConfigurationPropertyValue("CustomizedTemplate", this.Site); string ownerLoginNotExisted = TestSuiteBase.GenerateRandomString(10); string ownerName = TestSuiteBase.GenerateUniqueOwnerName(); string ownerEmail = TestSuiteBase.GenerateEmail(20); string portalUrl = TestSuiteBase.GeneratePortalUrl(20); string portalName = TestSuiteBase.GenerateUniquePortalName(); try { // Call the CreateSite method to create a site collection with owner login name not existed. this.adminsAdapter.CreateSite(url, title, description, lcid, webTemplate, ownerLoginNotExisted, ownerName, ownerEmail, portalUrl, portalName); } catch (SoapException exp) { strErrorCode = Common.ExtractErrorCodeFromSoapFault(exp); } // If the returned error code equals to 0x80131600, then MS-ADMINS_R1022 can be captured. Site.CaptureRequirementIfAreEqual <string>( "0x80131600", strErrorCode, 1022, @"[In CreateSiteSoapIn]If OwnerLogin is not an existing domain user account, the server MUST return a SOAP fault with error code 0x80131600."); }