Microsoft.Protocols.TestSuites.MS_DWSS.S01_ManageSites.MSDWSS_S01_TC10_DeleteDws_DeleteCurrentSiteSuccessfully C# (CSharp) Method

MSDWSS_S01_TC10_DeleteDws_DeleteCurrentSiteSuccessfully() private method

        public void MSDWSS_S01_TC10_DeleteDws_DeleteCurrentSiteSuccessfully()
        {
            this.dwsAdapter.ServiceUrl = Common.GetConfigurationPropertyValue("TestDWSSWebSite", this.Site);
            
            Error error;
            UsersItem users = new UsersItem();
            DocumentsItem documents = new DocumentsItem();
            
            users.Name = Common.GetConfigurationPropertyValue("UserName", this.Site);
            users.Email = Common.GetConfigurationPropertyValue("RegisteredUsersEmail", this.Site);
            
            documents.ID = Guid.NewGuid().ToString();
            documents.Name = Common.GetConfigurationPropertyValue("DocumentsName", this.Site) + "_" + Common.FormatCurrentDateTime();

            CreateDwsResultResults createDwsRespResults = this.dwsAdapter.CreateDws(string.Empty, users, string.Empty, documents, out error);
            
            // Redirect the web service to the newly created site.
            this.dwsAdapter.ServiceUrl = createDwsRespResults.Url + Common.GetConfigurationPropertyValue("TestDWSSSuffix", this.Site);
            
            // Delete the created web site.
            this.dwsAdapter.DeleteDws(out error);
            this.Site.Assert.IsNull(error, "The response should not contains an error.");
            
            // If the response isn't an error, it indicate that the server returns a Result element
            this.Site.CaptureRequirement(
                166,
                @"[In DeleteDws] If none of the prior conditions apply, the protocol server MUST delete the specified Document Workspace and return a Result element.");
        }