/// <summary> /// Verify RopGetStreamSize Failure Response /// </summary> /// <param name="ropGetStreamSizeResponse">The failure response of RopGetStreamSize request</param> /// <param name="inputHandleIndex">The field of InputHandleIndex in RopGetStreamSize request</param> private void VerifyRopGetStreamSizeFailureResponse(RopGetStreamSizeResponse ropGetStreamSizeResponse, byte inputHandleIndex) { // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R3296"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R3296 Site.CaptureRequirementIfAreEqual<Type>( typeof(byte), ropGetStreamSizeResponse.RopId.GetType(), 3296, @"[In RopGetStreamSize ROP Failure Response Buffer]RopId (1 byte): An unsigned integer."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R3298"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R3298 Site.CaptureRequirementIfAreEqual<byte>( (byte)RopId.RopGetStreamSize, ropGetStreamSizeResponse.RopId, 3298, @"[In RopGetStreamSize ROP Failure Response Buffer,RopId (1 byte)]For this operation[RopGetStreamSize], this field is set to 0x5E."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R3299"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R3299 Site.CaptureRequirementIfAreEqual<Type>( typeof(byte), ropGetStreamSizeResponse.InputHandleIndex.GetType(), 3299, @"[In RopGetStreamSize ROP Failure Response Buffer]InputHandleIndex (1 byte): An unsigned integer."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R3300"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R3300 Site.CaptureRequirementIfAreEqual<byte>( inputHandleIndex, ropGetStreamSizeResponse.InputHandleIndex, 3300, @"[In RopGetStreamSize ROP Failure 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_R3302"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R3302 Site.CaptureRequirementIfAreEqual<Type>( typeof(uint), ropGetStreamSizeResponse.ReturnValue.GetType(), 3302, @"[In RopGetStreamSize ROP Failure Response Buffer]ReturnValue (4 bytes): An unsigned integer."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R3304"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R3304 Site.CaptureRequirementIfAreNotEqual<uint>( SuccessReturnValue, ropGetStreamSizeResponse.ReturnValue, 3304, @"[In RopGetStreamSize ROP Failure Response Buffer,ReturnValue (4 bytes)]For this response[Failure Response], this field is set to a value other than 0x00000000."); }
/// <summary> /// Verify the RopGetStreamSize operation related requirements. /// </summary> /// <param name="ropGetStreamSizeResponse">The RopGetStreamSize response buffer structure.</param> private void VerifyRopGetStreamSize(RopGetStreamSizeResponse ropGetStreamSizeResponse) { // Since the RopGetStreamSize ROP response was parsed successfully, MS-OXCPRPT_R57502 can be captured directly. Site.CaptureRequirement( 57502, @"[In Processing RopGetStreamSize] The server responds with a RopGetStreamSize ROP response buffer."); // CPRPTErrorCode.None indicates the operation is performed successfully. if (ropGetStreamSizeResponse.ReturnValue.Equals((uint)CPRPTErrorCode.None)) { // Since the RopGetStreamSize ROP response is performed successfully, MS-OXCPRPT_R57502 can be captured directly. Site.CaptureRequirement( 308, @"[In RopGetStreamSize ROP] The RopGetStreamSize ROP ([MS-OXCROPS] section 2.2.9.5) retrieves the size of the stream."); // If this operation is performed successfully, that means this operation is valid on Stream objects. Site.CaptureRequirement( 30901, @"[In RopGetStreamSize ROP] This operation is valid on Stream objects."); // The parser has ensured the field satisfied the format, otherwise the response cannot be received. Site.CaptureRequirement( 320, @"[In RopGetStreamSize ROP Response Buffer] StreamSize (4 bytes): An integer ."); } }
/// <summary> /// Verify RopGetStreamSize Success Response /// </summary> /// <param name="ropGetStreamSizeResponse">The success response of RopGetStreamSize request</param> /// <param name="inputHandleIndex">The field of InputHandleIndex in RopGetStreamSize request</param> private void VerifyRopGetStreamSizeSuccessResponse(RopGetStreamSizeResponse ropGetStreamSizeResponse, byte inputHandleIndex) { // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R3285"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R3285 Site.CaptureRequirementIfAreEqual<Type>( typeof(byte), ropGetStreamSizeResponse.RopId.GetType(), 3285, @"[In RopGetStreamSize ROP Success Response Buffer]RopId (1 byte): An unsigned integer."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R3287"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R3287 Site.CaptureRequirementIfAreEqual<byte>( (byte)RopId.RopGetStreamSize, ropGetStreamSizeResponse.RopId, 3287, @"[In RopGetStreamSize ROP Success Response Buffer,RopId (1 byte)]For this operation[RopGetStreamSize], this field is set to 0x5E."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R3288"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R3288 Site.CaptureRequirementIfAreEqual<Type>( typeof(byte), ropGetStreamSizeResponse.InputHandleIndex.GetType(), 3288, @"[In RopGetStreamSize ROP Success Response Buffer]InputHandleIndex (1 byte): An unsigned integer."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R3289"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R3289 Site.CaptureRequirementIfAreEqual<byte>( inputHandleIndex, ropGetStreamSizeResponse.InputHandleIndex, 3289, @"[In RopGetStreamSize 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_R3291"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R3291 Site.CaptureRequirementIfAreEqual<Type>( typeof(uint), ropGetStreamSizeResponse.ReturnValue.GetType(), 3291, @"[In RopGetStreamSize ROP Success Response Buffer]ReturnValue (4 bytes): An unsigned integer."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R3293"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R3293 Site.CaptureRequirementIfAreEqual<uint>( SuccessReturnValue, ropGetStreamSizeResponse.ReturnValue, 3293, @"[In RopGetStreamSize 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_R3294"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R3294 Site.CaptureRequirementIfAreEqual<Type>( typeof(uint), ropGetStreamSizeResponse.StreamSize.GetType(), 3294, @"[In RopGetStreamSize ROP Success Response Buffer]StreamSize (4 bytes): An unsigned integer."); }