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

VerifyImportWeb() private méthode

Verify ImportWeb related requirements.
private VerifyImportWeb ( int importWebResult ) : void
importWebResult int The result of ImportWeb.
Résultat void
        private void VerifyImportWeb(int importWebResult)
        {
            Site.Log.Add(LogEntryKind.Comment, "Verify common requirements in ImportWeb 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(
                235,
                @"[In ImportWeb] [The ImportWeb operation is defined as:] <wsdl:operation name=""ImportWeb"">
              <wsdl:input message=""tns:ImportWebSoapIn"" />
              <wsdl:output message=""tns:ImportWebSoapOut"" />
              </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 R237.
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-SITESS_R237");

            // Verify MS-SITESS requirement: MS-SITESS_R237
            Site.CaptureRequirementIfIsTrue(
                isSchemaRight,
                237,
                @"[In ImportWeb] [The client sends an ImportWebSoapIn request message and] the server responds with an ImportWebSoapOut 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 R247.
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-SITESS_R247");

            // Verify MS-SITESS requirement: MS-SITESS_R247
            Site.CaptureRequirementIfIsTrue(
                isSchemaRight,
                247,
                @"[In ImportWebSoapOut] The SOAP body contains an ImportWebResponse 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 R265.
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-SITESS_R265");

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

            // Specifies whether the ImportWebResult is one of the following values:1,2,4,5,6,8,11.
            bool isRS266Satisfied = importWebResult == 1 ||
                        importWebResult == 2 || importWebResult == 4 ||
                        importWebResult == 5 || importWebResult == 6 ||
                        importWebResult == 8 || importWebResult == 11;
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-SITESS_R266, the value of isRS266Satisfied is:{0}, importWebResult = {1}", isRS266Satisfied, importWebResult);

            // Verify MS-SITESS requirement: MS-SITESS_R266
            Site.CaptureRequirementIfIsTrue(
                isRS266Satisfied,
                266,
                @"[In ImportWebResponse] ImportWebResult: The result of the operation is in the range [1, 2, 4 , 5, 6, 8, 11]  as specified in the table in section 3.1.4.8.2.2.");
        }