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

VerifyGetSpecialTableResponseBody() private method

Verify the GetSpecialTable response body related requirements.
private VerifyGetSpecialTableResponseBody ( GetSpecialTableResponseBody getSpecialTableResponseBody ) : void
getSpecialTableResponseBody GetSpecialTableResponseBody The GetSpecialTable response body to be verified.
return void
        private void VerifyGetSpecialTableResponseBody(GetSpecialTableResponseBody getSpecialTableResponseBody)
        {
            // Add the debug information
            this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R664");

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R664
            this.Site.CaptureRequirementIfIsInstanceOfType(
                getSpecialTableResponseBody.StatusCode,
                typeof(uint),
                664,
                @"[In GetSpecialTable 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_R665");

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R665
            this.Site.CaptureRequirementIfAreEqual<uint>(
                0,
                getSpecialTableResponseBody.StatusCode,
                665,
                @"[In GetSpecialTable 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_R666");

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R666
            this.Site.CaptureRequirementIfIsInstanceOfType(
                getSpecialTableResponseBody.ErrorCode,
                typeof(uint),
                666,
                @"[In GetSpecialTable 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_R667");

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R667
            this.Site.CaptureRequirementIfIsInstanceOfType(
                getSpecialTableResponseBody.CodePage,
                typeof(uint),
                667,
                @"[In GetSpecialTable Request Type  Success Response Body] CodePage (4 bytes): An unsigned integer that specifies the code page the server used to express string properties.");

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

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R668
            this.Site.CaptureRequirementIfIsInstanceOfType(
                getSpecialTableResponseBody.HasVersion,
                typeof(bool),
                668,
                @"[In GetSpecialTable Request Type  Success Response Body] HasVersion (1 byte): A Boolean value that specifies whether the Version field is present.");

            if (getSpecialTableResponseBody.HasVersion)
            {
                // Add the debug information
                this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R670");

                // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R670
                this.Site.CaptureRequirementIfIsNotNull(
                    getSpecialTableResponseBody.Version,
                    670,
                    @"[In GetSpecialTable Request Type  Success Response Body] [Version] This field is present when the value of the HasVersion field is nonzero.");

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

                // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R669
                this.Site.CaptureRequirementIfIsInstanceOfType(
                    getSpecialTableResponseBody.Version,
                    typeof(uint),
                    669,
                    @"[In GetSpecialTable Request Type  Success Response Body] Version (optional) (4 bytes): An unsigned integer that specifies the version number of the address book hierarchy table that the server has.");
            }
                        
            // Add the debug information
            this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R672");

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R672
            this.Site.CaptureRequirementIfIsInstanceOfType(
                getSpecialTableResponseBody.HasRows,
                typeof(bool),
                672,
                @"[In GetSpecialTable Request Type  Success Response Body] HasRows (1 byte): A Boolean value that specifies whether the RowCount and Rows fields are present.");

            if (getSpecialTableResponseBody.HasRows)
            {
                // Add the debug information
                this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R675");

                // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R675
                this.Site.CaptureRequirementIfIsNotNull(
                    getSpecialTableResponseBody.RowCount,
                    675,
                    @"[In GetSpecialTable Request Type  Success Response Body] [RowsCount] This field is present when the value of the HasRows field is nonzero.");
                
                // Add the debug information
                this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R673");

                // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R673
                this.Site.CaptureRequirementIfIsInstanceOfType(
                    getSpecialTableResponseBody.RowCount,
                    typeof(uint),
                    673,
                    @"[In GetSpecialTable Request Type  Success Response Body] RowsCount (optional) (4 bytes): An unsigned integer that specifies the number of structures in the Rows field.");

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

                // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R678
                this.Site.CaptureRequirementIfIsNotNull(
                    getSpecialTableResponseBody.Rows,
                    678,
                    @"[In GetSpecialTable Request Type  Success Response Body] [Rows] This field is present when the value of the HasRows field is nonzero.");
            }
            else
            {
                // Add the debug information
                this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R1452");

                // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R1452
                this.Site.CaptureRequirementIfIsNull(
                    getSpecialTableResponseBody.RowCount,
                    1452,
                    @"[In GetSpecialTable Request Type  Success Response Body] [RowsCount] This field is not present when the value of the HasRows field is zero.");

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

                // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R679
                this.Site.CaptureRequirementIfIsNull(
                    getSpecialTableResponseBody.Rows,
                    679,
                    @"[In GetSpecialTable Request Type  Success Response Body] [Rows] This field is not present when the value of the HasRows field is zero.");
            }

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

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R680
            this.Site.CaptureRequirementIfIsInstanceOfType(
                getSpecialTableResponseBody.AuxiliaryBufferSize,
                typeof(uint),
                680,
                @"[In GetSpecialTable 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_R681");

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R681
            this.Site.CaptureRequirementIfIsInstanceOfType(
                getSpecialTableResponseBody.AuxiliaryBuffer,
                typeof(byte[]),
                681,
                @"[In GetSpecialTable 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_R682");

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R682
            this.Site.CaptureRequirementIfAreEqual<uint>(
                getSpecialTableResponseBody.AuxiliaryBufferSize,
                (uint)getSpecialTableResponseBody.AuxiliaryBuffer.Length,
                682,
                @"[In GetSpecialTable Request Type  Success Response Body] [AuxiliaryBuffer] The size of this field, in bytes, is specified by the AuxiliaryBufferSize field.");
        }
        #endregion
MS_OXCMAPIHTTPAdapter