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

VerifyGetListCollectionOperation() private method

Verify the message syntax of GetListCollection operation when the response is received successfully.
private VerifyGetListCollectionOperation ( GetListCollectionResponseGetListCollectionResult getListCollectionResult ) : void
getListCollectionResult GetListCollectionResponseGetListCollectionResult The returned SOAP result.
return void
        private void VerifyGetListCollectionOperation(GetListCollectionResponseGetListCollectionResult getListCollectionResult)
        {
            Site.Assert.IsNotNull(getListCollectionResult, "The return value of this operation should have instance");

            // Verify R1791
            // 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(
                1791,
                @"[GetListCollection]<wsdl:operation name=""GetListCollection"">"
                + @"    <wsdl:input message=""GetListCollectionSoapIn"" />"
                + @"    <wsdl:output message=""GetListCollectionSoapOut"" />"
                + @"</wsdl:operation>");

            // Verify R581
            // 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(
                581,
                @"[In GetListCollection operation] [If the protocol client sends a "
                + "GetListCollectionSoapIn request message] the server responds with a "
                + "GetListCollectionSoapOut response message.");

            // Verify R1795
            // 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(
                1795,
                @"[GetListCollectionSoapOut]The SOAP Body contains a GetListCollectionResponse "
                + "element.");

            // Verify R1797
            // 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(
                1797,
                @"[The schema of GetListCollectionResponse is defined as:]"
                + @"<s:element name=""GetListCollectionResponse"">"
                + @"  <s:complexType>"
                + @"    <s:sequence>"
                + @"      <s:element name=""GetListCollectionResult"" minOccurs=""0"">"
                + @"        <s:complexType mixed=""true"">"
                + @"          <s:sequence>"
                + @"            <s:element name=""Lists"">"
                + @"              <s:complexType>"
                + @"                <s:sequence>"
                + @"                  <s:element name=""List"" type=""tns:ListDefinitionCT"" minOccurs=""0"" "
                + @"                             maxOccurs=""unbounded""/>"
                + @"                </s:sequence>"
                + @"              </s:complexType>"
                + @"            </s:element>"
                + @"          </s:sequence>"
                + @"        </s:complexType>"
                + @"      </s:element>"
                + @"    </s:sequence>"
                + @"  </s:complexType>"
                + @"</s:element>");

            // Verify the requirements of the ListDefinitionCT complex type.
            foreach (ListDefinitionCT listDefinitionCTItem in getListCollectionResult.Lists)
            {
                this.VerifyListDefinitionCT(listDefinitionCTItem);

                if (listDefinitionCTItem.HasRelatedLists != null)
                {
                    this.Site.Assert.AreEqual<string>(string.Empty, listDefinitionCTItem.HasRelatedLists, "[ListDefinitionCT.HasRelatedLists] When it is returned in GetListCollection (section 3.1.4.17) this value will be an empty string.");
                    //Verify MS-LISTSWS requirement: MS-LISTSWS_R3010002
                    Site.CaptureRequirement(
                        3010002,
                        @"[ListDefinitionCT.HasRelatedLists] When it is returned by GetListCollection (section 3.1.4.17) this value will be an empty string.");
                }
            }
        }
MS_LISTSWSAdapter