public void MSADMINS_S01_TC19_CreateSiteSuccessfully_OwnerNameEqualsToMaxLength()
{
// 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.GenerateRandomString(255);
string ownerEmail = TestSuiteBase.GenerateEmail(20);
string portalUrl = TestSuiteBase.GeneratePortalUrl(20);
string portalName = TestSuiteBase.GenerateUniquePortalName();
// Call CreateSite method to create a site collection with ownerName length equals to 255.
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.");
// If create site successfully with ownerName length equals to 255, then MS-ADMINS_R3037 can be verified.
Site.CaptureRequirement(
3037,
@"[In CreateSite]If the length of the OwnerName is 255 characters, the CreateSite operation will succeed.");
// Call DeleteSite method to delete the site collection created in above steps.
this.adminsAdapter.DeleteSite(result);
}