static private GetSearchRequest ( string conversationId, |
||
conversationId | string | The conversation for which to search. |
bodyPartPreference | The BodyPartPreference in the Options element. | |
bodyPreference | The BodyPreference in the Options element. | |
return | SearchRequest |
public void MSASCON_S05_TC03_Search_Status164() { this.CheckActiveSyncVersionIsNot140(); #region User2 sends an email to User1 this.SwitchUser(this.User2Information, true); string subject = Common.GenerateResourceName(Site, "Subject"); string user1MailboxAddress = Common.GetMailAddress(User1Information.UserName, User1Information.UserDomain); string user2MailboxAddress = Common.GetMailAddress(User2Information.UserName, User2Information.UserDomain); this.CallSendMailCommand(user2MailboxAddress, user1MailboxAddress, subject, null); TestSuiteBase.RecordCaseRelativeItems(this.User1Information, User1Information.InboxCollectionId, subject, false); #endregion if (Common.IsRequirementEnabled(220, this.Site)) { #region Call Search command with BodyPartPreference element and set the Type element to 3 this.SwitchUser(this.User1Information, false); DataStructures.Sync syncItem = this.SyncEmail(subject, User1Information.InboxCollectionId, true, null, null); BodyPartPreference bodyPartPreference = new BodyPartPreference() { Type = 3, }; SearchRequest searchRequest = TestSuiteHelper.GetSearchRequest(syncItem.Email.ConversationId, bodyPartPreference, null); DataStructures.SearchStore searchStore = this.CONAdapter.Search(searchRequest, false, 0); this.VerifyMessagePartStatus164(byte.Parse(searchStore.StoreStatus)); #endregion } }
/// <summary> /// Call Search command to find a specified conversation. /// </summary> /// <param name="conversationId">The ConversationId of the items to search.</param> /// <param name="itemsCount">The count of the items expected to be found.</param> /// <param name="bodyPartPreference">The BodyPartPreference element.</param> /// <param name="bodyPreference">The BodyPreference element.</param> /// <returns>The SearchStore instance that contains the search result.</returns> protected SearchStore CallSearchCommand(string conversationId, int itemsCount, Request.BodyPartPreference bodyPartPreference, Request.BodyPreference bodyPreference) { // Create Search command request. SearchRequest searchRequest = TestSuiteHelper.GetSearchRequest(conversationId, bodyPartPreference, bodyPreference); SearchStore searchStore = this.CONAdapter.Search(searchRequest, true, itemsCount); Site.Assert.AreEqual("1", searchStore.Status, "The Search operation should be success."); return(searchStore); }