Microsoft.Protocols.TestSuites.MS_LISTSWS.MS_LISTSWSAdapter.VerifyGetAttachmentCollectionOperation C# (CSharp) Method

VerifyGetAttachmentCollectionOperation() private method

Verify the message syntax of GetAttachmentCollection operation when the response is received successfully.
private VerifyGetAttachmentCollectionOperation ( GetAttachmentCollectionResponseGetAttachmentCollectionResult getAttachmentCollectionResult ) : void
getAttachmentCollectionResult GetAttachmentCollectionResponseGetAttachmentCollectionResult The result of the operation.
return void
        private void VerifyGetAttachmentCollectionOperation(
            GetAttachmentCollectionResponseGetAttachmentCollectionResult getAttachmentCollectionResult)
        {
            this.Site.Assert.IsNotNull(getAttachmentCollectionResult, "Should get a correct response from GetAttachmentCollection operation.");

            // Verify R548
            this.Site.Log.Add(
                    LogEntryKind.Debug,
                    "The actual value: getAttachmentCollectionResult.Attachments.Length[{0}] for requirement #R548",
                    getAttachmentCollectionResult.Attachments.Length);

            this.Site.CaptureRequirementIfIsNotNull(
                       getAttachmentCollectionResult.Attachments,
                       548,
                       @"[In GetAttachmentCollection operation] If the operation succeeds, the protocol server MUST return the collection of attachment URLs for the specified list item.");

            // Verify R1746
            // The response have been received successfully, then the following requirement can be captured.
            // If the response is not received and parsed successfully, the test case will fail before this requirement is captured 
            Site.CaptureRequirement(
                1746,
                @"[The schema of GetAttachmentCollection is defined as:]"
                + @"<wsdl:operation name=""GetAttachmentCollection"">"
                + @"    <wsdl:input message=""GetAttachmentCollectionSoapIn"" />"
                + @"    <wsdl:output message=""GetAttachmentCollectionSoapOut"" />"
                + @"</wsdl:operation>");

            // Verify R533
            // The response have been received successfully, then the following requirement can be captured.
            // If the response is not received and parsed successfully, the test case will fail before this requirement is captured 
            Site.CaptureRequirement(
                533,
                @"[In GetAttachmentCollection operation] [If the protocol client sends a "
                + "GetAttachmentCollectionSoapIn request message] the protocol server "
                + "responds with a GetAttachmentCollectionSoapOut response message.");

            // Verify R1753
            // The response have been received successfully, then the following requirement can be captured.
            // If the response is not received and parsed successfully, the test case will fail before this requirement is captured 
            Site.CaptureRequirement(
                1753,
                @"[GetAttachmentCollectionSoapOut]The SOAP Body contains a "
                + "GetAttachmentCollectionResponse element.");

            // Verify R1758
            // The response have been received successfully, then the following requirement can be captured.
            // If the response is not received and parsed successfully, the test case will fail before this requirement is captured 
            Site.CaptureRequirement(
                1758,
                @"[The schema of GetAttachmentCollectionResponse is defined as:]"
                + @"<s:element name=""GetAttachmentCollectionResponse"">"
                + @"  <s:complexType>"
                + @"    <s:sequence>"
                + @"      <s:element name=""GetAttachmentCollectionResult"" minOccurs=""0"">"
                + @"          <s:complexType mixed=""true"">"
                + @"            <s:sequence>"
                + @"              <s:element name=""Attachments"">"
                + @"                <s:complexType>"
                + @"                  <s:sequence>"
                + @"                    <s:element name=""Attachment"" type=""s:string"" minOccurs=""0""  "
                + @"                               maxOccurs=""unbounded"">"
                + @"                    </s:element>"
                + @"                  </s:sequence>"
                + @"                </s:complexType>"
                + @"              </s:element>"
                + @"            </s:sequence>"
                + @"          </s:complexType>"
                + @"      </s:element>"
                + @"    </s:sequence>"
                + @"  </s:complexType>"
                + @"</s:element>");
        }
MS_LISTSWSAdapter