Microsoft.Protocols.TestSuites.MS_DWSS.S03_ManageFolders.MSDWSS_S03_TC05_CreateFolder_ServerFailure C# (CSharp) Method

MSDWSS_S03_TC05_CreateFolder_ServerFailure() private method

private MSDWSS_S03_TC05_CreateFolder_ServerFailure ( ) : void
return void
        public void MSDWSS_S03_TC05_CreateFolder_ServerFailure()
        {
            this.dwsAdapter.ServiceUrl = Common.GetConfigurationPropertyValue("TestDWSSWebSite", this.Site);
            
            // Set Dws service credential to None credential.
            string userName = Common.GetConfigurationPropertyValue("NoneRoleUser", this.Site);
            string password = Common.GetConfigurationPropertyValue("NoneRoleUserPassword", this.Site);
            string domain = Common.GetConfigurationPropertyValue("Domain", this.Site);
            this.dwsAdapter.Credentials = new NetworkCredential(userName, password, domain);
            
            Error error;
            string folderUrl = Common.GetConfigurationPropertyValue("ValidFolderUrl", 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_R154");
            
            // Verify MS-DWSS requirement: MS-DWSS_R154
            this.Site.CaptureRequirementIfAreEqual<ErrorTypes>(
                ErrorTypes.ServerFailure,
                error.Value,
                154,
                @"[In CreateFolder] The protocol server MUST return an Error element with a ServerFailure error code if an unspecified error prevents creating the specified folder.");
        }