/// <summary> /// Verify RopSaveChangesAttachment Response /// </summary> /// <param name="ropSaveChangesAttachmentResponse">The response of RopSaveChangesAttachment request</param> /// <param name="responseHandleIndex">The field of ResponseHandleIndex in RopSaveChangesAttachment request</param> private void VerifyRopSaveChangesAttachmentResponse(RopSaveChangesAttachmentResponse ropSaveChangesAttachmentResponse, byte responseHandleIndex) { // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R2222"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R2222 Site.CaptureRequirementIfAreEqual<Type>( typeof(byte), ropSaveChangesAttachmentResponse.RopId.GetType(), 2222, @"[In RopSaveChangesAttachment ROP Response Buffer]RopId (1 byte): An unsigned integer."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R2224"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R2224 Site.CaptureRequirementIfAreEqual<byte>( (byte)RopId.RopSaveChangesAttachment, ropSaveChangesAttachmentResponse.RopId, 2224, @"[In RopSaveChangesAttachment ROP Response Buffer,RopId (1 byte)]For this operation[RopSaveChangesAttachment], this field is set to 0x25."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R2225"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R2225 Site.CaptureRequirementIfAreEqual<Type>( typeof(byte), ropSaveChangesAttachmentResponse.ResponseHandleIndex.GetType(), 2225, @"[In RopSaveChangesAttachment ROP Response Buffer]ResponseHandleIndex (1 byte): An unsigned integer."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R2226"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R2226 Site.CaptureRequirementIfAreEqual<byte>( responseHandleIndex, ropSaveChangesAttachmentResponse.ResponseHandleIndex, 2226, @"[In RopSaveChangesAttachment ROP Response Buffer,ResponseHandleIndex (1 byte)]This index MUST be set to the value specified in the ResponseHandleIndex field in the request."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R2228"); // Verify MS-OXCROPS requirement: MS-OXCROPS_R2228 Site.CaptureRequirementIfAreEqual<Type>( typeof(uint), ropSaveChangesAttachmentResponse.ReturnValue.GetType(), 2228, @"[In RopSaveChangesAttachment ROP Response Buffer]ReturnValue (4 bytes): An unsigned integer."); }
/// <summary> /// Save the attachment. /// </summary> /// <param name="objectHandle">A Server object handle.</param> /// <param name="saveChangesAttachmentReponse">The RopSaveChangesAttachmentResponse value.</param> protected void SaveAttachment(uint objectHandle, out RopSaveChangesAttachmentResponse saveChangesAttachmentReponse) { RopSaveChangesAttachmentRequest saveChangesAttachmentRequest = new RopSaveChangesAttachmentRequest() { RopId = (byte)RopId.RopSaveChangesAttachment, LogonId = CommonLogonId, ResponseHandleIndex = CommonOutputHandleIndex, // This index specifies the location in the Server object handle table that is referenced in the response. InputHandleIndex = CommonInputHandleIndex, SaveFlags = (byte)SaveFlags.ForceSave }; this.ResponseSOHs = this.MSOXCMSGAdapter.DoRopCall(saveChangesAttachmentRequest, objectHandle, ref this.response, ref this.rawData, GetPropertiesFlags.None); saveChangesAttachmentReponse = (RopSaveChangesAttachmentResponse)this.response; Site.Assert.AreEqual<uint>(TestSuiteBase.Success, saveChangesAttachmentReponse.ReturnValue, TestSuiteBase.ROPSucceedMsg); }