/// <summary> /// Captures DeleteAttachmentResponseMessageType related requirements. /// </summary> /// <param name="deleteAttachmentResponseMessage">An DeleteAttachmentResponseMessageType instance.</param> /// <param name="isSchemaValidated">A Boolean value indicates the schema validation result.</param> private void VerifyDeleteAttachmentResponseMessageType(DeleteAttachmentResponseMessageType deleteAttachmentResponseMessage, bool isSchemaValidated) { // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R387"); // Verify MS-OXWSATT requirement: MS-OXWSATT_R387 Site.CaptureRequirementIfIsTrue( isSchemaValidated, 387, @"[In m:DeleteAttachmentResponseMessageType Complex Type][The type of RootItemId element is] t:RootItemIdType (section 3.1.4.2.3.4))."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R240"); // Verify MS-OXWSATT requirement: MS-OXWSATT_R240 Site.CaptureRequirementIfIsTrue( isSchemaValidated, 240, @"[In m:DeleteAttachmentResponseMessageType Complex Type][The DeleteAttachmentResponseMessageType is defined as follow:] <xs:complexType name=""DeleteAttachmentResponseMessageType""> <xs:complexContent> <xs:extension base=""m:ResponseMessageType"" > <xs:sequence> <xs:element name=""RootItemId"" type=""t:RootItemIdType"" minOccurs=""0"" /> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType>"); RootItemIdType rootItemId = deleteAttachmentResponseMessage.RootItemId; // RootItemId is optional in DeleteAttachmentResponse if (rootItemId != null) { // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R482"); // Verify MS-OXWSATT requirement: MS-OXWSATT_R482 Site.Log.Add(LogEntryKind.Debug, "Length of root item id is:{0}", rootItemId.RootItemId.Length); bool isVerifyR482 = rootItemId.RootItemId.Length <= 512; Site.CaptureRequirementIfIsTrue( isVerifyR482, 482, @"[In t:RootItemIdType Complex Type][In RootItemId] The length of RootItemId is no more than 512 bytes after base64 decoding."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R556"); // Verify MS-OXWSATT requirement: MS-OXWSATT_R556 // Validate the RootItemChangeKey is not null and its length is no more than 512 bytes after base64 decoding. Site.Log.Add(LogEntryKind.Debug, "Length of root item change key is:{0}", rootItemId.RootItemChangeKey.Length); bool isVerifyR556 = rootItemId.RootItemChangeKey.Length <= 512; Site.CaptureRequirementIfIsTrue( isVerifyR556, 556, @"[In t:RootItemIdType Complex Type][In RootItemChangeKey] The length of RootItemChangeKey attribute is no more than 512 bytes after base64 decoding."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R533"); // Verify MS-OXWSATT requirement: MS-OXWSATT_R533 Site.CaptureRequirementIfIsTrue( isSchemaValidated, 533, @"[In Message Processing Events and Sequencing Rules][The DeleteAttachment operation] Deletes file and item attachments from an existing item in the server store."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R442"); // Verify MS-OXWSATT requirement: MS-OXWSATT_R442 Site.CaptureRequirementIfIsTrue( isSchemaValidated, 442, @"[In t:RootItemIdType Complex Type][The type of RootItemId attribute is] xs:string ([XMLSCHEMA2])."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R445"); // Verify MS-OXWSATT requirement: MS-OXWSATT_R445 Site.CaptureRequirementIfIsTrue( isSchemaValidated, 445, @"[In t:RootItemIdType Complex Type][The type of RootItemChangeKey attribute is] xs:string."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R113"); // Verify MS-OXWSATT requirement: MS-OXWSATT_R113 // The type of RootItemId is RootItemIdType, as verified in MS-OXWSATT_R387. // validateSchema has already validate the DeleteAttachmentResponse is not null and matches the schema. // And the elements and their types have been verified in MS-OXWSATT_R442 and MS-OXWSATT_R445. // Thus this requirement can be captured. Site.CaptureRequirementIfIsTrue( isSchemaValidated, 113, @"[In t:RootItemIdType Complex Type][The RootItemIdType is defined as follow:] <xs:complexType name=""RootItemIdType""> <xs:complexContent> <xs:extension base=""t:BaseItemIdType"" > <xs:attribute name=""RootItemId"" type=""xs:string"" use=""required"" /> <xs:attribute name=""RootItemChangeKey"" type=""xs:string"" use=""required"" /> </xs:extension> </xs:complexContent> </xs:complexType>"); } }