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

VerifyUpdateContentTypeXmlDocumentOperation() private method

Verify the message syntax of UpdateContentTypeXmlDocument operation when the response is received successfully.
private VerifyUpdateContentTypeXmlDocumentOperation ( System updateContentTypeXmlDocumentResult ) : void
updateContentTypeXmlDocumentResult System The result of the operation.
return void
        private void VerifyUpdateContentTypeXmlDocumentOperation(System.Xml.XmlNode updateContentTypeXmlDocumentResult)
        {
            // Ensure the SOAP result is de-serialized successfully.
            Site.Assume.IsNotNull(
                updateContentTypeXmlDocumentResult,
                "The result of UpdateContentTypeXmlDocument operation must not be null.");

            // Verify R2025
            // 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(
                2025,
                @"[The schema of UpdateContentTypeXmlDocument is defined as:]"
                + @"<wsdl:operation name=""UpdateContentTypeXmlDocument"">"
                + @"    <wsdl:input message=""UpdateContentTypeXmlDocumentSoapIn"" />"
                + @"    <wsdl:output message=""UpdateContentTypeXmlDocumentSoapOut"" />"
                + @"</wsdl:operation>");

            // Verify R862
            // 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(
                862,
                @"[In UpdateContentTypeXmlDocument operation] [If the protocol client sends "
                + "an UpdateContentTypeXmlDocumentSoapIn request message] the protocol server "
                + "responds with an UpdateContentTypeXmlDocumentSoapOut response message.");

            // Verify R870
            // Ensure the SOAP result is de-serialized successfully.
            Site.Assume.IsNotNull(
                updateContentTypeXmlDocumentResult,
                "The result of UpdateContentTypeXmlDocument operation must not be null.");

            // If no exception thrown and the result is not null, then the following 
            // requirement can be captured.
            Site.CaptureRequirementIfIsNotNull(
                updateContentTypeXmlDocumentResult,
                870,
                @"[In UpdateContentTypeXmlDocument operation] If no SOAP fault is thrown, the "
                + "protocol server MUST return a success UpdateContentTypeXmlDocumentResult.");

            // Verify R2031
            // 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(
                2031,
                @"[UpdateContentTypeXmlDocumentSoapOut]The SOAP Body contains an "
                + "UpdateContentTypeXmlDocumentResponse element.");

            // Verify R2036
            // 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(
                2036,
                @"[UpdateContentTypeXmlDocumentResponse]: <s:element name=""UpdateContentTypeXmlDocumentResponse"">
                  <s:complexType>
                    <s:sequence>
                      <s:element name=""UpdateContentTypeXmlDocumentResult"" minOccurs=""0"">
                        <s:complexType mixed=""true"">
                          <s:sequence>
                             <s:element name=""Success"" minOccurs=""0"">
                            <s:complexType />
                            </s:element>
                          </s:sequence>
                        </s:complexType>
                      </s:element>
                    </s:sequence>
                  </s:complexType>
                </s:element>");
        }
MS_LISTSWSAdapter