public void MSOXCMSG_S06_TC01_RopReloadCachedInformation() { this.CheckMapiHttpIsSupported(); this.ConnectToServer(ConnectionType.PrivateMailboxServer); #region Call RopLogon to log on a private mailbox. uint logonHandle; RopLogonResponse logonResponse = this.Logon(LogonType.Mailbox, out logonHandle); #endregion #region Call RopCreateMessage to create a new message object. uint targetMessageHandle = this.CreatedMessage(logonResponse.FolderIds[4], logonHandle); #endregion #region Call RopSaveChangesMessage to commit the new message object. RopSaveChangesMessageResponse saveChangesMessageResponse = this.SaveMessage(targetMessageHandle, (byte)SaveFlags.ForceSave); Site.Assert.AreEqual<uint>(TestSuiteBase.Success, saveChangesMessageResponse.ReturnValue, TestSuiteBase.ROPSucceedMsg); ulong messageId = saveChangesMessageResponse.MessageId; #endregion this.ReleaseRop(targetMessageHandle); #region Call RopOpenMessage to open the created message. RopOpenMessageResponse openMessageResponse; uint openedMessageHandle = this.OpenSpecificMessage(logonResponse.FolderIds[4], messageId, logonHandle, MessageOpenModeFlags.ReadWrite, out openMessageResponse); #endregion #region Call RopReloadCachedInformation to get information of the specific message. RopReloadCachedInformationRequest reloadCachedInformationRequest = new RopReloadCachedInformationRequest() { RopId = (byte)RopId.RopReloadCachedInformation, LogonId = CommonLogonId, InputHandleIndex = CommonInputHandleIndex, Reserved = 0x0000 }; this.response = new RopReloadCachedInformationResponse(); this.ResponseSOHs = this.MSOXCMSGAdapter.DoRopCall(reloadCachedInformationRequest, openedMessageHandle, ref this.response, ref this.rawData, GetPropertiesFlags.None); RopReloadCachedInformationResponse reloadCachedInformationResponse = (RopReloadCachedInformationResponse)this.response; #region Verify MS-OXCMSG_R279, MS-OXCMSG_R766 // Add the debug information this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMSG_R279"); // Verify MS-OXCMSG requirement: MS-OXCMSG_R279 this.Site.CaptureRequirementIfAreEqual<uint>( TestSuiteBase.Success, reloadCachedInformationResponse.ReturnValue, 279, @"[In Reload Message Object Header Info] A client retrieves the current state of the data returned in a RopOpenMessage ROP ([MS-OXCROPS] section 2.2.6.1) by sending a RopReloadCachedInformation ROP request ([MS-OXCROPS] section 2.2.6.7)."); // Add the debug information this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMSG_R766"); // Verify MS-OXCMSG requirement: MS-OXCMSG_R766 bool isVerifiedR766 = this.CompareResponseOfOpenMessageAndRopReloadCachedInformation(openMessageResponse, reloadCachedInformationResponse); this.Site.CaptureRequirementIfIsTrue( isVerifiedR766, 766, @"[In RopReloadCachedInformation ROP] The RopReloadCachedInformation ROP ([MS-OXCROPS] section 2.2.6.7) retrieves the same information as RopOpenMessage ROP ([MS-OXCROPS] section 2.2.6.1) but operates on an already opened Message object."); #endregion #endregion #region Call RopRelease to release all resources this.ReleaseRop(openedMessageHandle); #endregion }
public void MSOXCMSG_S06_TC02_RopReloadCachedInformationFailure() { this.CheckMapiHttpIsSupported(); this.ConnectToServer(ConnectionType.PrivateMailboxServer); #region Call RopLogon to log on a private mailbox. RopLogonResponse logonResponse = this.Logon(LogonType.Mailbox, out this.insideObjHandle); #endregion #region Call RopCreateMessage to create a new message object. uint targetMessageHandle = this.CreatedMessage(logonResponse.FolderIds[4], this.insideObjHandle); #endregion #region Call RopSaveChangesMessage to commit the new message object. RopSaveChangesMessageResponse saveChangesMessageResponse = this.SaveMessage(targetMessageHandle, (byte)SaveFlags.ForceSave); Site.Assert.AreEqual<uint>(TestSuiteBase.Success, saveChangesMessageResponse.ReturnValue, TestSuiteBase.ROPSucceedMsg); ulong messageId = saveChangesMessageResponse.MessageId; #endregion this.ReleaseRop(targetMessageHandle); #region Call RopOpenMessage to open the created message. RopOpenMessageResponse openMessageResponse; uint openedMessageHandle = this.OpenSpecificMessage(logonResponse.FolderIds[4], messageId, this.insideObjHandle, MessageOpenModeFlags.ReadWrite, out openMessageResponse); #endregion #region Call RopReloadCachedInformation which contains an InputHandleIndex that does not refer to a message object. RopReloadCachedInformationRequest reloadCachedInformationRequest = new RopReloadCachedInformationRequest() { RopId = (byte)RopId.RopReloadCachedInformation, LogonId = CommonLogonId, InputHandleIndex = CommonInputHandleIndex, Reserved = 0x0000 }; this.response = new RopReloadCachedInformationResponse(); this.ResponseSOHs = this.MSOXCMSGAdapter.DoRopCall(reloadCachedInformationRequest, TestSuiteBase.InvalidInputHandle, ref this.response, ref this.rawData, GetPropertiesFlags.None); RopReloadCachedInformationResponse reloadCachedInformationResponse = (RopReloadCachedInformationResponse)this.response; // Add the debug information this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMSG_R1498"); // Verify MS-OXCMSG requirement: MS-OXCMSG_R1498 this.Site.CaptureRequirementIfAreEqual<uint>( 0x000004b9, reloadCachedInformationResponse.ReturnValue, 1498, @"[In Receiving a RopReloadCachedInformation ROP Request] [ecNullObject (0x000004b9)] means the value of the InputHandleIndex field on which this ROP [RopReloadCachedInformation] was called does not refer to a Message object."); #endregion #region Call RopRelease to release all resources this.ReleaseRop(openedMessageHandle); #endregion }