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

VerifyRopGetReceiveFolderSuccessResponse() private method

Verify RopGetReceiveFolder Success Response
private VerifyRopGetReceiveFolderSuccessResponse ( RopGetReceiveFolderResponse ropGetReceiveFolderResponse, byte inputHandleIndex ) : void
ropGetReceiveFolderResponse RopGetReceiveFolderResponse The success response of RopGetReceiveFolder request
inputHandleIndex byte The field of InputHandleIndex in RopGetReceiveFolder request
return void
        private void VerifyRopGetReceiveFolderSuccessResponse(RopGetReceiveFolderResponse ropGetReceiveFolderResponse, byte inputHandleIndex)
        {
            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R148");

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R148
            Site.CaptureRequirementIfAreEqual<Type>(
                typeof(byte),
                ropGetReceiveFolderResponse.RopId.GetType(),
                148,
                @"[In RopGetReceiveFolder ROP Success Response Buffer] RopId (1 byte): An unsigned integer.");

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

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R150
            Site.CaptureRequirementIfAreEqual<byte>(
                (byte)RopId.RopGetReceiveFolder,
                ropGetReceiveFolderResponse.RopId,
                150,
                @"[In RopGetReceiveFolder ROP Success Response Buffer] RopId (1 byte): For this operation[RopGetReceiveFolder], this field[RopId (1 byte)] is set to 0x27.");

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

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R151
            Site.CaptureRequirementIfAreEqual<Type>(
                typeof(byte),
                ropGetReceiveFolderResponse.InputHandleIndex.GetType(),
                151,
                @"[In RopGetReceiveFolder ROP Success Response Buffer] InputHandleIndex (1 byte): An unsigned integer index.");

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

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R152
            Site.CaptureRequirementIfAreEqual<byte>(
                inputHandleIndex,
                ropGetReceiveFolderResponse.InputHandleIndex,
                152,
                @"[In RopGetReceiveFolder ROP Success 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_R153");

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R153
            Site.CaptureRequirementIfAreEqual<Type>(
                typeof(uint),
                ropGetReceiveFolderResponse.ReturnValue.GetType(),
                153,
                @"[In RopGetReceiveFolder ROP Success Response Buffer] ReturnValue (4 bytes): An unsigned integer.");

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

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R155
            Site.CaptureRequirementIfAreEqual<uint>(
                SuccessReturnValue,
                ropGetReceiveFolderResponse.ReturnValue,
                155,
                @"[In RopGetReceiveFolder ROP Success Response Buffer] ReturnValue (4 bytes): For this response[Success Response], this field is set to 0x00000000.");

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

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R156
            Site.CaptureRequirementIfAreEqual<int>(
                8,
                Marshal.SizeOf(ropGetReceiveFolderResponse.FolderId.GetType()),
                156,
                @"[In RopGetReceiveFolder ROP Success Response Buffer] FolderId (8 bytes): An identifier.");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R158, the actual value of ExplicitMessageClass is :{0}", BitConverter.ToString(ropGetReceiveFolderResponse.MessageClass));

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R158
            bool isVerifyR158 = this.IsNullTerminatedASCIIStr(ropGetReceiveFolderResponse.MessageClass);

            Site.CaptureRequirementIfIsTrue(
                isVerifyR158,
                158,
                @"[In RopGetReceiveFolder ROP Success Response Buffer] ExplicitMessageClass (variable): A null-terminated ASCII string.");
        }
MS_OXCROPSAdapter