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

VerifyGetTemplateInfoResponseBody() private method

Verify the GetTemplateInfo response body related requirements.
private VerifyGetTemplateInfoResponseBody ( GetTemplateInfoResponseBody getTemplateInfoResponseBody ) : void
getTemplateInfoResponseBody GetTemplateInfoResponseBody The GetTemplateInfo response body to be verified.
return void
        private void VerifyGetTemplateInfoResponseBody(GetTemplateInfoResponseBody getTemplateInfoResponseBody)
        {
            // Add the debug information
            this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R713");

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R713
            this.Site.CaptureRequirementIfIsInstanceOfType(
                getTemplateInfoResponseBody.StatusCode,
                typeof(uint),
                713,
                @"[In GetTemplateInfo 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_R714");

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R714
            this.Site.CaptureRequirementIfAreEqual<uint>(
                0,
                getTemplateInfoResponseBody.StatusCode,
                714,
                @"[In GetTemplateInfo 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_R715");

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R715
            this.Site.CaptureRequirementIfIsInstanceOfType(
                getTemplateInfoResponseBody.ErrorCode,
                typeof(uint),
                715,
                @"[In GetTemplateInfo 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_R716");

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

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

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R717
            this.Site.CaptureRequirementIfIsInstanceOfType(
                getTemplateInfoResponseBody.HasRow,
                typeof(bool),
                717,
                @"[In GetTemplateInfo Request Type Success Response Body] HasRow (1 byte): A Boolean value that specifies whether the Rows field is present.");

            if (getTemplateInfoResponseBody.HasRow)
            {
                // Add the debug information
                this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R719");

                // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R719
                this.Site.CaptureRequirementIfIsInstanceOfType(
                    getTemplateInfoResponseBody.Row,
                    typeof(AddressBookPropertyValueList),
                    719,
                    @"[In GetTemplateInfo Request Type Success Response Body] [Row] This field is present when the value of the HasRow field is nonzero.");

                for (int i = 0; i < getTemplateInfoResponseBody.Row.Value.PropertyValueCount; i++)
                {
                    this.VerifyAddressBookTaggedPropertyValueStructure(getTemplateInfoResponseBody.Row.Value.PropertyValues[i]);
                }
            }
            else
            {
                // Add the debug information
                this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R720");

                // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R720
                this.Site.CaptureRequirementIfIsNull(
                    getTemplateInfoResponseBody.Row,
                    720,
                    @"[In GetTemplateInfo Request Type Success Response Body] [Row] This field is not present when the value of the HasRow field is zero.");
            }

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

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R721
            this.Site.CaptureRequirementIfIsInstanceOfType(
                getTemplateInfoResponseBody.AuxiliaryBufferSize,
                typeof(uint),
                721,
                @"[In GetTemplateInfo 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_R722");

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R722
            this.Site.CaptureRequirementIfIsInstanceOfType(
                getTemplateInfoResponseBody.AuxiliaryBuffer,
                typeof(byte[]),
                722,
                @"[In GetTemplateInfo 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_R723");

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