/// <summary> /// Verify RopTransportSend Failure Response /// </summary> /// <param name="ropTransportSendResponse">The failure response of RopTransportSend request</param> /// <param name="inputHandleIndex">The field of InputHandleIndex in RopTransportSend request</param> private void VerifyRopTransportSendFailureResponse(RopTransportSendResponse ropTransportSendResponse, byte inputHandleIndex) { // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R4632"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R4632 Site.CaptureRequirementIfAreEqual<Type>( typeof(byte), ropTransportSendResponse.RopId.GetType(), 4632, @"[In RopTransportSend ROP Failure Response Buffer]RopId (1 byte): An unsigned integer."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R4634"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R4634 Site.CaptureRequirementIfAreEqual<byte>( (byte)RopId.RopTransportSend, ropTransportSendResponse.RopId, 4634, @"[In RopTransportSend ROP Failure Response Buffer]RopId (1 byte): For this operation[RopTransportSend], this field is set to 0x4A."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R4635"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R4635 Site.CaptureRequirementIfAreEqual<Type>( typeof(byte), ropTransportSendResponse.InputHandleIndex.GetType(), 4635, @"[In RopTransportSend ROP Failure Response Buffer]InputHandleIndex (1 byte): An unsigned integer."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R4636"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R4636 Site.CaptureRequirementIfAreEqual<byte>( inputHandleIndex, ropTransportSendResponse.InputHandleIndex, 4636, @"[In RopTransportSend 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_R4637"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R4637 Site.CaptureRequirementIfAreEqual<Type>( typeof(uint), ropTransportSendResponse.ReturnValue.GetType(), 4637, @"[In RopTransportSend ROP Failure Response Buffer]ReturnValue (4 bytes): An unsigned integer."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R4639"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R4639 Site.CaptureRequirementIfAreNotEqual<uint>( SuccessReturnValue, ropTransportSendResponse.ReturnValue, 4639, @"[In RopTransportSend ROP Failure Response Buffer]ReturnValue (4 bytes): For this response[Failure Response], this field is set to a value other than 0x00000000."); }
/// <summary> /// Verify RopTransportSend Success Response /// </summary> /// <param name="ropTransportSendResponse">The success response of RopTransportSend request</param> /// <param name="inputHandleIndex">The field of InputHandleIndex in RopTransportSend request</param> private void VerifyRopTransportSendSuccessResponse(RopTransportSendResponse ropTransportSendResponse, byte inputHandleIndex) { // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R2476"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R2476 Site.CaptureRequirementIfAreEqual<Type>( typeof(byte), ropTransportSendResponse.RopId.GetType(), 2476, @"[In RopTransportSend ROP Success Response Buffer] RopId (1 byte): An unsigned integer."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R2478"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R2478 Site.CaptureRequirementIfAreEqual<byte>( (byte)RopId.RopTransportSend, ropTransportSendResponse.RopId, 2478, @"[In RopTransportSend ROP Success Response Buffer] RopId (1 byte):For this operation[RopTransportSend], this field is set to 0x4A."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R2479"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R2479 Site.CaptureRequirementIfAreEqual<Type>( typeof(byte), ropTransportSendResponse.InputHandleIndex.GetType(), 2479, @"[In RopTransportSend ROP Success Response Buffer]InputHandleIndex (1 byte): An unsigned integer."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R2480"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R2480 Site.CaptureRequirementIfAreEqual<byte>( inputHandleIndex, ropTransportSendResponse.InputHandleIndex, 2480, @"[In RopTransportSend 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_R2482"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R2482 Site.CaptureRequirementIfAreEqual<Type>( typeof(uint), ropTransportSendResponse.ReturnValue.GetType(), 2482, @"[In RopTransportSend ROP Success Response Buffer]ReturnValue (4 bytes): An unsigned integer."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R4686"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R4686 Site.CaptureRequirementIfAreEqual<uint>( SuccessReturnValue, ropTransportSendResponse.ReturnValue, 4686, @"[In RopTransportSend ROP Success Response Buffer,ReturnValue (4 bytes)] For this response, this field is set to 0x00000000."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R2484,NoPropertiesReturned:{0}", ropTransportSendResponse.NoPropertiesReturned); // Verify MS-OXCROPS requirement: MS-OXCROPS_R2484 // If NoPropertiesReturned is byte type and can be boolean type representation, then verify R2484 bool isVerifyR2484 = (typeof(byte) == ropTransportSendResponse.NoPropertiesReturned.GetType()) && ((Convert.ToBoolean(ropTransportSendResponse.NoPropertiesReturned) == true) || (Convert.ToBoolean(ropTransportSendResponse.NoPropertiesReturned) == false)); Site.CaptureRequirementIfIsTrue( isVerifyR2484, 2484, @"[In RopTransportSend ROP Success Response Buffer]NoPropertiesReturned (1 byte): An Boolean."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R2486"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R2486 Site.CaptureRequirementIfAreEqual<Type>( typeof(ushort), ropTransportSendResponse.PropertyValueCount.GetType(), 2486, @"[In RopTransportSend ROP Success Response Buffer]PropertyValueCount (2 bytes): An unsigned integer."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R2488"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R2488 Site.CaptureRequirementIfAreEqual<Type>( typeof(TaggedPropertyValue[]), ropTransportSendResponse.PropertyValues.GetType(), 2488, @"[In RopTransportSend ROP Success Response Buffer]PropertyValues (variable): An array of TaggedPropertyValue structures."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R2490"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R2490 Site.CaptureRequirementIfAreEqual<ushort>( ropTransportSendResponse.PropertyValueCount, (ushort)ropTransportSendResponse.PropertyValues.Length, 2490, @"[In RopTransportSend ROP Success Response Buffer,PropertyValues (variable)]The number of structures contained in this field is specified by the PropertyValueCount field."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R2485"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R2485 Site.CaptureRequirementIfIsTrue( (ropTransportSendResponse.NoPropertiesReturned == 0 && ropTransportSendResponse.PropertyValueCount > 0) || (ropTransportSendResponse.NoPropertiesReturned == 1 && ropTransportSendResponse.PropertyValueCount == 0), 2485, @"[In RopTransportSend ROP Success Response Buffer,NoPropertiesReturned (1 byte)]This value specifies whether property values are returned."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R2487"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R2487 Site.CaptureRequirementIfAreEqual<int>( ropTransportSendResponse.PropertyValueCount, ropTransportSendResponse.PropertyValues.Length, 2487, @"[In RopTransportSend ROP Success Response Buffer,PropertyValueCount (2 bytes)]This value specifies the number of structures returned in the PropertyValues field."); foreach (TaggedPropertyValue taggedPropertyValue in ropTransportSendResponse.PropertyValues) { // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCDATA_R468"); // Verify MS-OXCROPS requirement: MS-OXCDATA_R468 Site.CaptureRequirementIfAreEqual<Type>( typeof(PropertyTag), taggedPropertyValue.PropertyTag.GetType(), "MS-OXCDATA", 468, @"[In TaggedPropertyValue Structure] PropertyTag (4 bytes): A PropertyTag structure, as specified in section 2.9, giving the values of the PropertyId and PropertyType fields for the property."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCDATA_R181"); // Verify MS-OXCROPS requirement: MS-OXCDATA_R181 Site.CaptureRequirementIfAreEqual<Type>( typeof(ushort), taggedPropertyValue.PropertyTag.PropertyType.GetType(), "MS-OXCDATA", 181, @"[In PropertyTag Structure] PropertyType (2 bytes): An unsigned integer that identifies the data type of the property value, as specified by the table in section 2.11.1."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCDATA_R182"); // Verify MS-OXCROPS requirement: MS-OXCDATA_R182 Site.CaptureRequirementIfAreEqual<Type>( typeof(ushort), taggedPropertyValue.PropertyTag.PropertyId.GetType(), "MS-OXCDATA", 182, @"[In PropertyTag Structure] PropertyId (2 bytes): An unsigned integer that identifies the property."); } }