public void MSADMINS_S01_TC10_CreateSiteSuccessfully_OwnerEmailExceedMaxLength()
{
// 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 = Common.GetConfigurationPropertyValue("UrlWithOutPort", this.Site) + 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(256);
string portalUrl = TestSuiteBase.GeneratePortalUrl(20);
string portalName = TestSuiteBase.GenerateUniquePortalName();
// Call CreateSite method to create a site collection with owner email exceeding max length.
string result = this.adminsAdapter.CreateSite(url, title, description, lcid, webTemplate, ownerLogin, ownerName, ownerEmail, portalUrl, portalName);
Site.Assert.IsTrue(Uri.IsWellFormedUriString(result, UriKind.Absolute), "Create site should succeed.");
string ownerEmailReturned = sutAdapter.GetSiteProperty(result, "OwnerEmail");
// If the site collection is created successfully. The OwnerEmail returned contains 255 characters and the exceeded characters are truncated, then MS-ADMINS_R3026 can be captured.
Site.CaptureRequirementIfAreEqual<string>(
ownerEmail.Substring(0, 255),
ownerEmailReturned,
3026,
@"[In CreateSite]If the length of the OwnerEmail exceeds 255 characters, the CreateSite operation will succeed without exception, the exceeded characters are truncated.");
// Call DeleteSite to delete the site collection created in above steps.
this.adminsAdapter.DeleteSite(result);
}