/// <summary> /// This operation is used to remove an XML document in the XML document collection of a site content type. /// </summary> /// <param name="contentTypeId">contentTypeID is the content type ID of the site content type to be modified</param> /// <param name="documentUri">documentUri is the namespace URI of the XML document of the site content type to remove</param> /// <returns>The result of RemoveContentTypeXmlDocument.</returns> public RemoveContentTypeXmlDocumentResponseRemoveContentTypeXmlDocumentResult RemoveContentTypeXmlDocument(string contentTypeId, string documentUri) { RemoveContentTypeXmlDocumentResponseRemoveContentTypeXmlDocumentResult result = new RemoveContentTypeXmlDocumentResponseRemoveContentTypeXmlDocumentResult(); result = this.service.RemoveContentTypeXmlDocument(contentTypeId, documentUri); this.ValidateRemoveContentTypeXmlDocument(); this.CaptureTransportRelatedRequirements(); return(result); }
public void MSWEBSS_S02_TC06_RemoveContentTypeXmlDocument() { // Create a new content type on the context site. string contentTypeID = CreateContentType(this.GenerateRandomString(10)); RemoveContentTypeXmlDocumentResponseRemoveContentTypeXmlDocumentResult actual = new RemoveContentTypeXmlDocumentResponseRemoveContentTypeXmlDocumentResult(); // Remove a document from the document collection of a site content type. actual = Adapter.RemoveContentTypeXmlDocument(contentTypeID, this.GenerateRandomString(10)); // Verify MS-WEBSS requirement: MS-WEBSS_R389 Site.CaptureRequirementIfIsNotNull( actual.Success, 389, @"[In RemoveContentTypeXmlDocument] If an XML document in the requested content type has the namespace specified by the documentUri, it is removed from the document collection."); // Verify MS-WEBSS requirement: MS-WEBSS_R390 Site.CaptureRequirementIfIsTrue( actual.Success.ToString().Contains("RemoveContentTypeXmlDocumentResult"), 390, @"[In RemoveContentTypeXmlDocument] If no error is raised, the protocol server MUST return a success RemoveContentTypeXmlDocumentResult."); // Verify MS-WEBSS requirement: MS-WEBSS_R401 Site.CaptureRequirementIfIsTrue( actual.Success.ToString().Contains("RemoveContentTypeXmlDocumentResult"), 401, @"[In RemoveContentTypeXmlDocumentResponse] RemoveContentTypeXmlDocumentResult: If the operation succeeds, a RemoveContentTypeXmlDocumentResult MUST be returned."); Site.Assert.IsFalse(!Common.IsRequirementEnabled(1033, this.Site), "This operation RemoveContentTypeXmlDocument failed."); if (Common.IsRequirementEnabled(1033, this.Site)) { // If the operation succeed, Verify MS-WEBSS requirement: MS-WEBSS_R1033 this.Site.CaptureRequirement( 1033, @"[In Appendix B: Product Behavior] Implementation does support this [RemoveContentTypeXmlDocument] operation.(<19>Windows SharePoint Services 3.0 and above follow this behavior.)"); } }
public void MSWEBSS_S02_TC06_RemoveContentTypeXmlDocument() { // Create a new content type on the context site. string contentTypeID = CreateContentType(this.GenerateRandomString(10)); RemoveContentTypeXmlDocumentResponseRemoveContentTypeXmlDocumentResult actual = new RemoveContentTypeXmlDocumentResponseRemoveContentTypeXmlDocumentResult(); // Remove a document from the document collection of a site content type. actual = Adapter.RemoveContentTypeXmlDocument(contentTypeID, this.GenerateRandomString(10)); // Verify MS-WEBSS requirement: MS-WEBSS_R389 Site.CaptureRequirementIfIsNotNull( actual.Success, 389, @"[In RemoveContentTypeXmlDocument] If an XML document in the requested content type has the namespace specified by the documentUri, it is removed from the document collection."); // Verify MS-WEBSS requirement: MS-WEBSS_R390 Site.CaptureRequirementIfIsTrue( actual.Success.ToString().Contains("RemoveContentTypeXmlDocumentResult"), 390, @"[In RemoveContentTypeXmlDocument] If no error is raised, the protocol server MUST return a success RemoveContentTypeXmlDocumentResult."); // Verify MS-WEBSS requirement: MS-WEBSS_R401 Site.CaptureRequirementIfIsTrue( actual.Success.ToString().Contains("RemoveContentTypeXmlDocumentResult"), 401, @"[In RemoveContentTypeXmlDocumentResponse] RemoveContentTypeXmlDocumentResult: If the operation succeeds, a RemoveContentTypeXmlDocumentResult MUST be returned."); Site.Assert.IsFalse(!Common.IsRequirementEnabled(1033, this.Site), "This operation RemoveContentTypeXmlDocument failed."); if (Common.IsRequirementEnabled(1033, this.Site)) { // If the operation succeed, Verify MS-WEBSS requirement: MS-WEBSS_R1033 this.Site.CaptureRequirement( 1033, @"[In Appendix B: Product Behavior] Implementation does support this [RemoveContentTypeXmlDocument] operation.(<17>Windows SharePoint Services 3.0 and above follow this behavior.)"); } }
/// <summary> /// This operation is used to remove an XML document in the XML document collection of a site content type. /// </summary> /// <param name="contentTypeId">contentTypeID is the content type ID of the site content type to be modified</param> /// <param name="documentUri">documentUri is the namespace URI of the XML document of the site content type to remove</param> /// <returns>The result of RemoveContentTypeXmlDocument.</returns> public RemoveContentTypeXmlDocumentResponseRemoveContentTypeXmlDocumentResult RemoveContentTypeXmlDocument(string contentTypeId, string documentUri) { RemoveContentTypeXmlDocumentResponseRemoveContentTypeXmlDocumentResult result = new RemoveContentTypeXmlDocumentResponseRemoveContentTypeXmlDocumentResult(); result = this.service.RemoveContentTypeXmlDocument(contentTypeId, documentUri); this.ValidateRemoveContentTypeXmlDocument(); this.CaptureTransportRelatedRequirements(); return result; }