Microsoft.Protocols.TestSuites.MS_ASRM.TestSuiteBase.SyncEmail C# (CSharp) Method

SyncEmail() protected method

Find an email with specific subject and folder.
protected SyncEmail ( string subject, string collectionId, bool rightsManagementSupport, bool isRetryNeeded ) : Sync
subject string The subject of the email item.
collectionId string Identify the folder as the collection being synchronized.
rightsManagementSupport bool A boolean value specifies whether the server will decompress and decrypt rights-managed email messages before sending them to the client or not
isRetryNeeded bool A boolean value specifies whether need retry.
return Microsoft.Protocols.TestSuites.Common.DataStructures.Sync
        protected DataStructures.Sync SyncEmail(string subject, string collectionId, bool? rightsManagementSupport, bool isRetryNeeded)
        {
            SyncRequest syncRequest = Common.CreateInitialSyncRequest(collectionId);
            DataStructures.SyncStore initSyncResult = this.ASRMAdapter.Sync(syncRequest);

            // Verify sync change result
            this.Site.Assert.AreEqual<byte>(1, initSyncResult.CollectionStatus, "If the Sync command executes successfully, the Status in response should be 1.");

            syncRequest = TestSuiteHelper.CreateSyncRequest(initSyncResult.SyncKey, collectionId, rightsManagementSupport);
            DataStructures.Sync sync = this.ASRMAdapter.SyncEmail(syncRequest, subject, isRetryNeeded);
            return sync;
        }