Microsoft.Protocols.TestSuites.MS_OXCROPS.MS_OXCROPSAdapter.VerifyRopDeleteMessagesResponse C# (CSharp) Method

VerifyRopDeleteMessagesResponse() private method

Verify RopDeleteMessages Response
private VerifyRopDeleteMessagesResponse ( RopDeleteMessagesResponse ropDeleteMessageResponse, byte inputHandleIndex ) : void
ropDeleteMessageResponse RopDeleteMessagesResponse The response of RopDeleteMessages request
inputHandleIndex byte The field of InputHandleIndex in RopDeleteMessages request
return void
        private void VerifyRopDeleteMessagesResponse(RopDeleteMessagesResponse ropDeleteMessageResponse, byte inputHandleIndex)
        {
            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R944");

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R944
            Site.CaptureRequirementIfAreEqual<Type>(
                typeof(byte),
                ropDeleteMessageResponse.RopId.GetType(),
                944,
                @"[In RopDeleteMessages ROP Response Buffer] RopId (1 byte): An unsigned integer.");

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

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R946
            Site.CaptureRequirementIfAreEqual<byte>(
                (byte)RopId.RopDeleteMessages,
                ropDeleteMessageResponse.RopId,
                946,
                @"[In RopDeleteMessages ROP Response Buffer] RopId (1 byte): For this operation[RopDeleteMessages], this field[RopId (1 byte)] is set to 0x1E.");

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

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R947
            Site.CaptureRequirementIfAreEqual<Type>(
                typeof(byte),
                ropDeleteMessageResponse.InputHandleIndex.GetType(),
                947,
                @"[In RopDeleteMessages ROP Response Buffer] InputHandleIndex (1 byte): An unsigned integer.");

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

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R948
            Site.CaptureRequirementIfAreEqual<byte>(
                inputHandleIndex,
                ropDeleteMessageResponse.InputHandleIndex,
                948,
                @"[In RopDeleteMessages ROP Response Buffer] InputHandleIndex (1 byte): This index MUST be set to the value specified in the InputHandleIndex field in the request.");

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

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R949
            Site.CaptureRequirementIfAreEqual<Type>(
                typeof(uint),
                ropDeleteMessageResponse.ReturnValue.GetType(),
                949,
                @"[In RopDeleteMessages ROP Response Buffer] ReturnValue (4 bytes): An unsigned integer.");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R951,PartialCompletion:{0}", ropDeleteMessageResponse.PartialCompletion);

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R951
            // If PartialCompletion is byte type and can be boolean type representation, then verify R951
            bool isVerifyR951 = (typeof(byte) == ropDeleteMessageResponse.PartialCompletion.GetType()) &&
                                ((Convert.ToBoolean(ropDeleteMessageResponse.PartialCompletion) == true) ||
                                (Convert.ToBoolean(ropDeleteMessageResponse.PartialCompletion) == false));

            Site.CaptureRequirementIfIsTrue(
                isVerifyR951,
                951,
                @"[In RopDeleteMessages ROP Response Buffer] PartialCompletion (1 byte): A Boolean.");
        }
        #endregion
MS_OXCROPSAdapter