/// <summary> /// Verify RopReadPerUserInformation Failure Response /// </summary> /// <param name="ropReadPerUserInformationResponse">The failure response of RopReadPerUserInformation request</param> /// <param name="inputHandleIndex">The field of InputHandleIndex in RopReadPerUserInformation request</param> private void VerifyRopReadPerUserInformationFailureResponse(RopReadPerUserInformationResponse ropReadPerUserInformationResponse, byte inputHandleIndex) { // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R491"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R491 Site.CaptureRequirementIfAreEqual<Type>( typeof(byte), ropReadPerUserInformationResponse.RopId.GetType(), 491, @"[In RopReadPerUserInformation ROP Failure Response Buffer] RopId (1 byte): An unsigned integer."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R493"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R493 Site.CaptureRequirementIfAreEqual<byte>( (byte)RopId.RopReadPerUserInformation, ropReadPerUserInformationResponse.RopId, 493, @"[In RopReadPerUserInformation ROP Failure Response Buffer] RopId (1 byte): For this operation[RopReadPerUserInformation], this field[RopId (1 byte)] is set to 0x63."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R494"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R494 Site.CaptureRequirementIfAreEqual<Type>( typeof(byte), ropReadPerUserInformationResponse.InputHandleIndex.GetType(), 494, @"[In RopReadPerUserInformation ROP Failure Response Buffer] InputHandleIndex (1 byte): An unsigned integer."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R495"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R495 Site.CaptureRequirementIfAreEqual<byte>( inputHandleIndex, ropReadPerUserInformationResponse.InputHandleIndex, 495, @"[In RopReadPerUserInformation 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_R496"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R496 Site.CaptureRequirementIfAreEqual<Type>( typeof(uint), ropReadPerUserInformationResponse.ReturnValue.GetType(), 496, @"[In RopReadPerUserInformation ROP Failure Response Buffer] ReturnValue (4 bytes): An unsigned integer."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R498"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R498 Site.CaptureRequirementIfAreNotEqual<uint>( SuccessReturnValue, ropReadPerUserInformationResponse.ReturnValue, 498, @"[In RopReadPerUserInformation ROP Failure Response Buffer] ReturnValue (4 bytes): For this response[Failure Response], this field[ReturnValue (4 bytes)] is set to a value other than 0x00000000."); }
/// <summary> /// Verify the response by sending the ROP RopReadPerUserInformation. /// </summary> /// <param name="response">The structure of ROP RopReadPerUserInformation response.</param> private void VerifyRopReadPerUserInformation(RopReadPerUserInformationResponse response) { // If server returns Data, change numbers associated with a message are returned. if (response.Data != null && response.DataSize != 0) { // Add the debug information this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCSTOR_R502"); // If the response can be parsed successfully and the return value is success, indicates the ROP's functionality is consistent with its description. this.Site.CaptureRequirement( 502, @"[In RopReadPerUserInformation ROP] RopReadPerUserInformation is used to obtain a set of change numbers, each of which is associated with a message that the user has read in a specific public folder."); // Add the debug information this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCSTOR_R542"); // Verify MS-OXCSTOR requirement: MS-OXCSTOR_R542 this.Site.CaptureRequirementIfAreEqual<int>( response.Data.Length, (int)response.DataSize, 542, @"[In RopReadPerUserInformation ROP Success Response Buffer] DataSize: Contains the size, in bytes, of the data being returned."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCSTOR_R546"); // Verify MS-OXCSTOR requirement: MS-OXCSTOR_R546 Site.CaptureRequirementIfAreEqual<int>( (int)response.DataSize, response.Data.Length, 546, @"[In RopReadPerUserInformation ROP Request Buffer] Data: The size of the BLOB MUST be equal to the value specified in the DataSize field."); } }
/// <summary> /// Verify RopReadPerUserInformation Success Response /// </summary> /// <param name="ropReadPerUserInformationResponse">The success response of RopReadPerUserInformation request</param> /// <param name="inputHandleIndex">The field of InputHandleIndex in RopReadPerUserInformation request</param> private void VerifyRopReadPerUserInformationSuccessResponse(RopReadPerUserInformationResponse ropReadPerUserInformationResponse, byte inputHandleIndex) { // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R476"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R476 Site.CaptureRequirementIfAreEqual<Type>( typeof(byte), ropReadPerUserInformationResponse.RopId.GetType(), 476, @"[In RopReadPerUserInformation ROP Success Response Buffer] RopId (1 byte): An unsigned integer."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R478"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R478 Site.CaptureRequirementIfAreEqual<byte>( (byte)RopId.RopReadPerUserInformation, ropReadPerUserInformationResponse.RopId, 478, @"[In RopReadPerUserInformation ROP Success Response Buffer] RopId (1 byte): For this operation[RopReadPerUserInformation], this field[RopId (1 byte)] is set to 0x63."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R479"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R479 Site.CaptureRequirementIfAreEqual<Type>( typeof(byte), ropReadPerUserInformationResponse.InputHandleIndex.GetType(), 479, @"[In RopReadPerUserInformation ROP Success Response Buffer] InputHandleIndex (1 byte): An unsigned integer."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R480"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R480 Site.CaptureRequirementIfAreEqual<byte>( inputHandleIndex, ropReadPerUserInformationResponse.InputHandleIndex, 480, @"[In RopReadPerUserInformation 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_R481"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R481 Site.CaptureRequirementIfAreEqual<Type>( typeof(uint), ropReadPerUserInformationResponse.ReturnValue.GetType(), 481, @"[In RopReadPerUserInformation ROP Success Response Buffer] ReturnValue (4 bytes): An unsigned integer."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R483"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R483 Site.CaptureRequirementIfAreEqual<uint>( SuccessReturnValue, ropReadPerUserInformationResponse.ReturnValue, 483, @"[In RopReadPerUserInformation ROP Success Response Buffer] ReturnValue (4 bytes): For this response[Success Response], this field[ReturnValue (4 bytes)] is set to 0x00000000."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R484,HasFinished:{0}", ropReadPerUserInformationResponse.HasFinished); // Verify MS-OXCROPS requirement: MS-OXCROPS_R484 // If HasFinished is of the byte type and can be represented by the boolean type, then Verify R484 bool isVerifyR484 = (typeof(byte) == ropReadPerUserInformationResponse.HasFinished.GetType()) && ((Convert.ToBoolean(ropReadPerUserInformationResponse.HasFinished) == true) || (Convert.ToBoolean(ropReadPerUserInformationResponse.HasFinished) == false)); Site.CaptureRequirementIfIsTrue( isVerifyR484, 484, @"[In RopReadPerUserInformation ROP Success Response Buffer] HasFinished (1 byte): A Boolean."); // Verify MS-OXCROPS requirement: MS-OXCROPS_R486 Site.CaptureRequirementIfAreEqual<Type>( typeof(ushort), ropReadPerUserInformationResponse.DataSize.GetType(), 486, @"[In RopReadPerUserInformation ROP Success Response Buffer] DataSize (2 bytes): An unsigned integer."); }