예제 #1
0
        /// <summary>
        /// Verify the RopLockRegionStream operation related requirements.
        /// </summary>
        /// <param name="ropLockRegionStreamResponse">The RopLockRegionStream response buffer structure.</param>
        private void VerifyRopLockRegionStream(RopLockRegionStreamResponse ropLockRegionStreamResponse)
        {
            // Since the RopLockRegionStream ROP response was parsed successfully, MS-OXCPRPT_R60703 can be captured directly.
            Site.CaptureRequirement(
                60703,
                @"[In Processing RopLockRegionStream] The server responds with a RopLockRegionStream ROP response buffer.");

            if (Common.IsRequirementEnabled(750, this.Site))
            {
                if (ropLockRegionStreamResponse.ReturnValue.Equals((uint)CPRPTErrorCode.None))
                {
                    // If this operation is performed successfully, that means this operation is valid on Stream objects.
                    Site.CaptureRequirement(
                       750,
                       @"[In Appendix A: Product Behavior] Implementation does implement the RopLockRegionStream ROP. (<15> Section 3.2.5.20: Exchange 2003 and Exchange 2007 implement the RopLockRegionStream ROP.)");

                    // If this operation is performed successfully, that means this operation is valid on Stream objects.
                    Site.CaptureRequirement(
                        37401,
                        @"[In RopLockRegionStream ROP] This operation is valid on Stream objects.");
                }
            }
        }
        /// <summary>
        /// Verify RopLockRegionStream Response
        /// </summary>
        /// <param name="ropLockRegionStreamResponse">The response of RopLockRegionStream request</param>
        /// <param name="inputHandleIndex">The field of InputHandleIndex in RopLockRegionStream request</param>
        private void VerifyRopLockRegionStreamResponse(RopLockRegionStreamResponse ropLockRegionStreamResponse, byte inputHandleIndex)
        {
            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R3433");

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

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

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R3435
            Site.CaptureRequirementIfAreEqual<byte>(
                (byte)RopId.RopLockRegionStream,
                ropLockRegionStreamResponse.RopId,
                3435,
                @"[In RopLockRegionStream ROP Response Buffer,RopId (1 byte)]For this operation[RopLockRegionStream], this field is set to 0x5B.");

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

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

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

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R3437
            Site.CaptureRequirementIfAreEqual<byte>(
                inputHandleIndex,
                ropLockRegionStreamResponse.InputHandleIndex,
                3437,
                @"[In RopLockRegionStream 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_R3439");

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R3439
            Site.CaptureRequirementIfAreEqual<Type>(
                typeof(uint),
                ropLockRegionStreamResponse.ReturnValue.GetType(),
                3439,
                @"[In RopLockRegionStream ROP Response Buffer]ReturnValue (4 bytes): An unsigned integer.");
        }