예제 #1
0
        /// <summary>
        /// Verify the message syntax of UpdateList operation when the response is received 
        /// successfully.
        /// </summary>
        /// <param name="updateListResult">The result of the operation.</param>
        private void VerifyUpdateListOperation(UpdateListResponseUpdateListResult updateListResult)
        {
            // Ensure the SOAP result is de-serialized successfully.
            Site.Assume.IsNotNull(
                updateListResult,
                "The result of UpdateList operation must not be null.");

            // Verify R2038
            // 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(
                2038,
                @"[The schema of UpdateList is defined as:]<wsdl:operation name=""UpdateList"">"
                + @"    <wsdl:input message=""UpdateListSoapIn"" />"
                + @"    <wsdl:output message=""UpdateListSoapOut"" />"
                + @"</wsdl:operation>");

            // Verify R883
            // 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(
                883,
                @"[In UpdateList operation] [If the protocol client sends an UpdateListSoapIn "
                + "request message] The server MUST respond with an UpdateListSoapOut response "
                + "message.");

            // Verify R2046
            // 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(
                2046,
                @"[UpdateListSoapOut]The SOAP Body contains an UpdateListResponse element.");

            // Verify R2061
            // 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(
                2061,
                @"[The schema of UpdateListResponse is defined as:]"
                + @"<s:element name=""UpdateListResponse"">  <s:complexType>"
                + @"    <s:sequence>"
                + @"      <s:element name=""UpdateListResult"" minOccurs=""0"">"
                + @"        <s:complexType mixed=""true"">"
                + @"          <s:sequence>"
                + @"            <s:element name=""Results"">"
                + @"              <s:complexType mixed=""true"">"
                + @"                <s:sequence>"
                + @"                  <s:element name=""NewFields"" type=""tns:UpdateListFieldResults"" />"
                + @"                  <s:element name=""UpdateFields"" "
                + @"                             type=""tns:UpdateListFieldResults"" />"
                + @"                  <s:element name=""DeleteFields"" "
                + @"                             type=""tns:UpdateListFieldResults"" />"
                + @"                  <s:element name=""ListProperties"" type=""tns:ListDefinitionCT"" />"
                + @"                </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.
            this.VerifyListDefinitionCT(updateListResult.Results.ListProperties);

            // Verify the requirements of the UpdateListFieldResults complex type.
            if (updateListResult.Results != null)
            {
                this.VerifyUpdateListFieldResults(updateListResult.Results);
            }

            // Verify R2062
            // 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(
                2062,
                @"[UpdateListResponse]UpdateListResult: The results of the UpdateList request.");

            // Verify R2063
            // 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(
                2063,
                @"[UpdateListResponse]Results: The container element for the result categories.");

            // Verify R2064
            // 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(
                2064,
                @"[UpdateListResponse]NewFields: The container element for the results of any add  field requests. See section 2.2.4.14.");

            // Verify R2065
            // 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(
                2065,
                @"[UpdateListResponse]DeleteFields: The container element for the results of any delete field requests. See section 2.2.4.14.");

            // Verify R2066
            // 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(
                2066,
                @"[UpdateListResponse]UpdateFields: The container element for the results of any update field requests. See section 2.2.4.14.");
               
            //Verify requirement: MS-LISTSWS_R3010001
            if (Common.IsRequirementEnabled(3010001, this.Site))
            {
                if (!bool.Parse(updateListResult.Results.ListProperties.HasRelatedLists))
                {
                    Site.CaptureRequirement(
                    3010001,
                    @"[ListDefinitionCT.HasRelatedLists] Otherwise [if this list does not have any related lists] is ""False"".");
                }
            }
            
        }