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

VerifyTransportRequirements() private method

Verify the requirements of the transport when the response is received successfully.
private VerifyTransportRequirements ( ) : void
return void
        private void VerifyTransportRequirements()
        {
            string transport = Common.GetConfigurationPropertyValue("TransportType", this.Site);

            if (string.Compare(transport, AdapterHelper.TransportHttp, StringComparison.OrdinalIgnoreCase) == 0)
            {
                // Verify MS-LISTSWS requirement MS-LISTSWS_R1.
                // Having received the response successfully have proved the HTTP 
                // transport is supported. If the HTTP transport is not supported, the response 
                Site.CaptureRequirement(
                    1,
                    @"[In Transport] Protocol servers MUST support SOAP over HTTP.");
            }
            else
            {
                if (string.Compare(transport, AdapterHelper.TransportHttps, StringComparison.OrdinalIgnoreCase) == 0)
                {
                    if (Common.IsRequirementEnabled(3, this.Site))
                    {
                        // Verify MS-LISTSWS requirement: MS-LISTSWS_R3
                        // Having received the response successfully have proved the HTTPS 
                        // transport is supported. If the HTTPS transport is not supported, the 
                        // response can't be received successfully.
                        Site.CaptureRequirement(
                            3,
                            @"[In Transport] Implementation does additionally support SOAP over HTTPS for securing communication with protocol clients. (The 2007 Microsoft® Office system/Windows® SharePoint® Services 3.0 and above follow this behavior.)");
                    }
                }
                else
                {
                    this.Site.Assert.Fail("The transport is not valid for the value {0}", transport);
                }
            }

            SoapProtocolVersion soapVersion = this.listsProxy.SoapVersion;

            if (soapVersion == SoapProtocolVersion.Soap11
                || soapVersion == SoapProtocolVersion.Soap12)
            {
                // Verify MS-LISTSWS requirement MS-LISTSWS_R4
                // Having received the response successfully have proved the message 
                // format is correct. If the message format is incorrect, the response can't be
                // received successfully.
                Site.CaptureRequirement(
                    4,
                    @"[In Transport]Protocol messages MUST be formatted as specified either in "
                    + @"[SOAP1.1], ""SOAP Envelope"", or in [SOAP1.2/1], ""SOAP Message Construct"".");
            }

            // Verify R1177
            // 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(
                1177,
                @"[In Common Message Syntax]The syntax of the definitions uses XML schema, "
                + "as specified in [XMLSCHEMA1] and [XMLSCHEMA2], and WSDL, as specified in [WSDL].");

            // Verify R1178
            // 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(
                1178,
                @"[In Namespaces]This protocol specifies and references XML namespaces by "
                + "using the mechanisms specified in [XMLNS].");
        }
MS_LISTSWSAdapter