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

VerifyConnectSuccessResponseBody() private method

Verify the Connect success response body related requirements.
private VerifyConnectSuccessResponseBody ( ConnectSuccessResponseBody connectSuccessResponseBody ) : void
connectSuccessResponseBody Microsoft.Protocols.TestSuites.Common.ConnectSuccessResponseBody The Connect success response body to be verified.
return void
        private void VerifyConnectSuccessResponseBody(ConnectSuccessResponseBody connectSuccessResponseBody)
        {
            // Add the debug information
            this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R209");

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R209
            this.Site.CaptureRequirementIfIsInstanceOfType(
                connectSuccessResponseBody.StatusCode,
                typeof(uint),
                209,
                @"[In Connect Request Type Success 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_R1349");

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

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

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R210
            this.Site.CaptureRequirementIfIsInstanceOfType(
                connectSuccessResponseBody.ErrorCode,
                typeof(uint),
                210,
                @"[In Connect Request Type Success 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_R211");

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R211
            this.Site.CaptureRequirementIfIsInstanceOfType(
                connectSuccessResponseBody.PollsMax,
                typeof(uint),
                211,
                @"[In Connect Request Type Success Response Body] PollsMax (4 bytes): An unsigned integer that specifies the number of milliseconds for the maximum polling interval.");

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

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R212
            this.Site.CaptureRequirementIfIsInstanceOfType(
                connectSuccessResponseBody.RetryCount,
                typeof(uint),
                212,
                @"[In Connect Request Type Success Response Body] RetryCount (4 bytes): An unsigned integer that specifies the number of times to retry request types.");

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

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R214
            this.Site.CaptureRequirementIfIsInstanceOfType(
                connectSuccessResponseBody.RetryDelay,
                typeof(uint),
                214,
                @"[In Connect Request Type Success Response Body] RetryDelay (4 bytes): An unsigned integer that specifies the number of milliseconds for the client to wait before retrying a failed request type.");

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

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R1351
            this.Site.CaptureRequirementIfIsInstanceOfType(
                connectSuccessResponseBody.AuxiliaryBufferSize,
                typeof(uint),
                1351,
                @"[In Connect Request Type Success 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_R218");

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R218
            this.Site.CaptureRequirementIfIsInstanceOfType(
                connectSuccessResponseBody.AuxiliaryBuffer,
                typeof(byte[]),
                218,
                @"[In Connect Request Type Success 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_R1352, the length of AuxiliaryBuffer is {0}, the value of AuxiliaryBufferSize is {1}.", 
                connectSuccessResponseBody.AuxiliaryBuffer.Length, 
                connectSuccessResponseBody.AuxiliaryBufferSize);
        
            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R1352
            this.Site.CaptureRequirementIfAreEqual<uint>(
                connectSuccessResponseBody.AuxiliaryBufferSize,
                (uint)connectSuccessResponseBody.AuxiliaryBuffer.Length,
                1352,
                @"[In Connect Request Type Success Response Body] [AuxiliaryBuffer] The size of this field, in bytes, is specified by the AuxiliaryBufferSize field.");
        }
        #endregion
MS_OXCMAPIHTTPAdapter