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

VerifyGetPropsResponseBody() private method

Verify the requirements related to GetProps request type response body.
private VerifyGetPropsResponseBody ( GetPropsResponseBody getPropsResponseBody ) : void
getPropsResponseBody GetPropsResponseBody The response body of GetProps request type.
return void
        private void VerifyGetPropsResponseBody(GetPropsResponseBody getPropsResponseBody)
        {
            // Add the debug information
            this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R619");
        
            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R619
            this.Site.CaptureRequirementIfIsInstanceOfType(
                getPropsResponseBody.StatusCode,
                typeof(uint),
                619,
                @"[In GetProps 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_R620");
        
            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R620
            this.Site.CaptureRequirementIfAreEqual<uint>(
                0,
                getPropsResponseBody.StatusCode,
                620,
                @"[In GetProps 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_R621");
        
            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R621
            this.Site.CaptureRequirementIfIsInstanceOfType(
                getPropsResponseBody.ErrorCode,
                typeof(uint),
                621,
                @"[In GetProps 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_R622");
        
            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R622
            this.Site.CaptureRequirementIfIsInstanceOfType(
                getPropsResponseBody.CodePage,
                typeof(uint),
                622,
                @"[In GetProps Request Type Success Response Body] CodePage (4 bytes): An unsigned integer that specifies the code page that the server used to express string properties.");

            // Add the debug information
            this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R623");
        
            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R623
            this.Site.CaptureRequirementIfIsInstanceOfType(
                getPropsResponseBody.HasPropertyValues,
                typeof(bool),
                623,
                @"[In GetProps Request Type Success Response Body] HasPropertyValues (1 byte): A Boolean value that specifies whether the PropertyValues field is present.");

            if (getPropsResponseBody.HasPropertyValues)
            {
                // Add the debug information
                this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R626");
        
                // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R626
                // Because the HasPropertyValues field is true, so if the PropertyValues field has value, R626 will be verified.
                this.Site.CaptureRequirementIfIsNotNull(
                    getPropsResponseBody.PropertyValues,
                    626,
                    @"[In GetProps Request Type Success Response Body] [PropertyValues] This field is present when the value of the HasPropertyValues field is nonzero.");
            }
            else
            {
                // Add the debug information
                this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R627");
        
                // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R627
                // Because the HasPropertyValues field is false, so if the PropertyValues field has not value, R627 will be verified.
                this.Site.CaptureRequirementIfIsNull(
                    getPropsResponseBody.PropertyValues,
                    627,
                    @"[In GetProps Request Type Success Response Body] [PropertyValues] This field is not present when the value of the HasPropertyValues field is zero.");
            }

            // Add the debug information
            this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R628");
        
            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R628
            this.Site.CaptureRequirementIfIsInstanceOfType(
                getPropsResponseBody.AuxiliaryBufferSize,
                typeof(uint),
                628,
                @"[In GetProps 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_R629");
        
            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R629
            this.Site.CaptureRequirementIfIsInstanceOfType(
                getPropsResponseBody.AuxiliaryBuffer,
                typeof(byte[]),
                629,
                @"[In GetProps 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_R630");
        
            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R630
            this.Site.CaptureRequirementIfAreEqual<uint>(
                getPropsResponseBody.AuxiliaryBufferSize,
                (uint)getPropsResponseBody.AuxiliaryBuffer.Length,
                630,
                @"[In GetProps Request Type Success Response Body] [AuxiliaryBuffer] The size of this field, in bytes, is specified by the AuxiliaryBufferSize field.");
        }
        #endregion
MS_OXCMAPIHTTPAdapter