public void MSADMINS_S01_TC06_CreateSiteSuccessfully_PortalUrlAbsent()
{
// 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.");
// Call CreateSite method to create a site collection with PortalUrl absent.
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(20);
string portalName = TestSuiteBase.GenerateUniquePortalName();
string result = this.adminsAdapter.CreateSite(url, title, description, lcid, webTemplate, ownerLogin, ownerName, ownerEmail, null, portalName);
Site.Assert.IsTrue(Uri.IsWellFormedUriString(result, UriKind.Absolute), "Create site should succeed.");
string defaultPortalUrl = sutAdapter.GetSiteProperty(result, "PortalUrl");
// If create site successfully with no portalUrl and the returned portalUrl property value equals to empty, so no portal URL set in the database, then MS-ADMINS_R2057 can be captured.
Site.CaptureRequirementIfAreEqual<string>(
string.Empty,
defaultPortalUrl,
2057,
@"[In CreateSite]If [the PortalUrl] nothing is specified, no portal URL will be set in the database.");
// Call DeleteSite method to delete the site collection created in above steps.
this.adminsAdapter.DeleteSite(result);
}