Microsoft.Protocols.TestSuites.MS_SITESS.MS_SITESSAdapter.VerifyExportWeb C# (CSharp) Méthode

VerifyExportWeb() private méthode

Verify ExportWeb related requirements.
private VerifyExportWeb ( int exportWebResult ) : void
exportWebResult int The result of ExportWeb.
Résultat void
        private void VerifyExportWeb(int exportWebResult)
        {
            Site.Log.Add(LogEntryKind.Comment, "Verify common requirements in ExportWeb operation.");
            this.VerifyCommonReqs();

            // When code can run to this line, it indicates the soap out message for this operation is received, else the operation will throw exception above.
            // So this operation's description is consistent with server.
            Site.CaptureRequirement(
                54,
                @"[In ExportWeb] [The Exportweb operation is defined as:] <wsdl:operation name=""ExportWeb"">
              <wsdl:input message=""tns:ExportWebSoapIn"" />
              <wsdl:output message=""tns:ExportWebSoapOut"" />
              </wsdl:operation>");
            bool isSchemaRight = SchemaValidation.XmlValidationErrors.Count == 0 && SchemaValidation.XmlValidationWarnings.Count == 0;

            // When the variable isSchemaRight is true, it exposes that the message's format described in the Open Specification is consistent with server. So we can verify R56, R66, R87.
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-SITESS_R56");

            // Verify MS-SITESS requirement: MS-SITESS_R56
            Site.CaptureRequirementIfIsTrue(
                isSchemaRight,
                56,
                @"[In ExportWeb] [The client sends an ExportWebSoapIn request message and] the server responds with an ExportWebSoapOut response message.");

            // When the variable isSchemaRight is true, it exposes that the message's format described in the Open Specification is consistent with server. So we can verify R66.
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-SITESS_R66");

            // Verify MS-SITESS requirement: MS-SITESS_R66
            Site.CaptureRequirementIfIsTrue(
                isSchemaRight,
                66,
                @"[In ExportWebSoapOut] The SOAP body contains an ExportWebResponse element.");

            // When the variable isSchemaRight is true, it exposes that the message's format described in the Open Specification is consistent with server. So we can verify R87.
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-SITESS_R87");

            // Verify MS-SITESS requirement: MS-SITESS_R87
            Site.CaptureRequirementIfIsTrue(
                isSchemaRight,
                87,
                @"[In ExportWebResponse] [The ExportWebResponse element is defined as:] <s:element name=""ExportWebResponse"">
              <s:complexType>
              <s:sequence>
              <s:element minOccurs=""1"" maxOccurs=""1"" name=""ExportWebResult"" type=""s:int"" />
              </s:sequence>
              </s:complexType>
              </s:element>");

            // Specifies whether the ExportWebResult is one of the following values:1, 4, 5, 6, 7, 8.
            bool isResultInRange = (exportWebResult == 1) ||
                                      (exportWebResult == 4) ||
                                      (exportWebResult == 5) ||
                                      (exportWebResult == 6) ||
                                      (exportWebResult == 7) ||
                                      (exportWebResult == 8);
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-SITESS_R88, the result of ExportWeb is {0}", exportWebResult);

            // Verify MS-SITESS requirement: MS-SITESS_R88
            Site.CaptureRequirementIfIsTrue(
                isResultInRange,
                88,
                @"[In ExportWebResponse] ExportWebResult: The result of the operation is in the range [1, 4, 5, 6, 7, 8] as  specified in the table in section 3.1.4.2.2.");
        }