public void MSDWSS_S03_TC04_CreateFolder_NoAccess()
{
this.dwsAdapter.ServiceUrl = Common.GetConfigurationPropertyValue("TestDWSSWebSite", this.Site);
// Set Dws service credential to Reader credential which does not have permission to create a folder.
string userName = Common.GetConfigurationPropertyValue("ReaderRoleUser", this.Site);
string password = Common.GetConfigurationPropertyValue("ReaderRoleUserPassword", this.Site);
string domain = Common.GetConfigurationPropertyValue("Domain", this.Site);
this.dwsAdapter.Credentials = new NetworkCredential(userName, password, domain);
Error error;
string folderUrl = Common.GetConfigurationPropertyValue("NewFolderUrl", this.Site) + "_" + Common.FormatCurrentDateTime();
this.dwsAdapter.CreateFolder(folderUrl, out error);
this.Site.Assert.IsNotNull(error, "The response is expected to be an error.");
// Add the debug information
this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-DWSS_R151");
// Verify MS-DWSS requirement: MS-DWSS_R151
this.Site.CaptureRequirementIfAreEqual<ErrorTypes>(
ErrorTypes.NoAccess,
error.Value,
151,
@"[In CreateFolder] If the user does not have sufficient access permissions to create the folder, the protocol server MUST return an Error element with a NoAccess error code.");
}