Microsoft.Protocols.TestSuites.MS_OXCMAPIHTTP.MS_OXCMAPIHTTPAdapter.VerifyBindResponseBody C# (CSharp) Method

VerifyBindResponseBody() private method

Verify the Bind response body related requirements.
private VerifyBindResponseBody ( BindResponseBody bindResponseBody ) : void
bindResponseBody BindResponseBody The Bind response body to be verified.
return void
        private void VerifyBindResponseBody(BindResponseBody bindResponseBody)
        {
            // Add the debug information
            this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R346");

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R346
            this.Site.CaptureRequirementIfIsInstanceOfType(
                bindResponseBody.StatusCode,
                typeof(uint),
                346,
                @"[In Bind Request Type Response Body] StatusCode (4 bytes): An unsigned integer that specifies the status of the request.");

            // Add the debug information
            this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R347");

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R347
            this.Site.CaptureRequirementIfAreEqual<uint>(
                0,
                bindResponseBody.StatusCode,
                347,
                @"[In Bind Request Type Response Body] [StatusCode] This field MUST be set to 0x00000000.");

            // Add the debug information
            this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R348");

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R348
            this.Site.CaptureRequirementIfIsInstanceOfType(
                bindResponseBody.ErrorCode,
                typeof(uint),
                348,
                @"[In Bind Request Type Response Body] ErrorCode (4 bytes): An unsigned integer that specifies the return status of the operation.");

            // Add the debug information
            this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R349");

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R349
            this.Site.CaptureRequirementIfIsInstanceOfType(
                bindResponseBody.ServerGuid,
                typeof(Guid),
                349,
                @"[In Bind Request Type Response Body] ServerGuid (16 bytes): A GUID that is associated with a specific address book server.");

            // Add the debug information
            this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R350");

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R350
            this.Site.CaptureRequirementIfIsInstanceOfType(
                bindResponseBody.AuxiliaryBufferSize,
                typeof(uint),
                350,
                @"[In Bind Request Type Response Body] AuxiliaryBufferSize (4 bytes): An unsigned integer that specifies the size, in bytes, of the AuxiliaryBuffer field.");

            // Add the debug information
            this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R351");

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R351
            this.Site.CaptureRequirementIfIsInstanceOfType(
                bindResponseBody.AuxiliaryBuffer,
                typeof(byte[]),
                351,
                @"[In Bind Request Type Response Body] AuxiliaryBuffer (variable): An array of bytes that constitute the auxiliary payload data returned from the server.");

            // Add the debug information
            this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R352");

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R352
            this.Site.CaptureRequirementIfAreEqual<uint>(
                bindResponseBody.AuxiliaryBufferSize,
                (uint)bindResponseBody.AuxiliaryBuffer.Length,
                352,
                @"[In Bind Request Type Response Body] [AuxiliaryBuffer] The size of this field, in bytes, is specified by the AuxiliaryBufferSize field.");

            // Add the debug information
            this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R1446");
        
            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R1446
            // If the response body is not null, it indicates that the server issues a response to a Bind request type.
            this.Site.CaptureRequirementIfIsNotNull(
                bindResponseBody,
                1446,
                @"[In Responding to a Connect or Bind Request Type Request] The server issues a response, as specified in section 2.2.2.2, to a Bind request type request, as specified in section 2.2.5.1.1.");
        }
        #endregion
MS_OXCMAPIHTTPAdapter