Microsoft.Protocols.TestSuites.MS_ASEMAIL.S02_EmailVoiceAttachment.UpdateVoiceEmailWithInvalidData C# (CSharp) Method

UpdateVoiceEmailWithInvalidData() private method

Update email with invalid data
private UpdateVoiceEmailWithInvalidData ( string invalidElement ) : string
invalidElement string invalid element send to server
return string
        private string UpdateVoiceEmailWithInvalidData(string invalidElement)
        {
            // Switch to user2 mailbox
            this.SwitchUser(this.User2Information, true);

            // Sync changes
            SyncStore initSyncResult = this.InitializeSync(this.User2Information.InboxCollectionId);
            SyncStore syncChangeResult = this.SyncChanges(initSyncResult.SyncKey, this.User2Information.InboxCollectionId, null);
            string syncKey = syncChangeResult.SyncKey;
            string serverId = this.User2Information.InboxCollectionId;

            // Create normal Sync change request
            Request.SyncCollectionChange changeData = TestSuiteHelper.CreateSyncChangeData(true, serverId, null, null);
            SyncRequest syncRequest = TestSuiteHelper.CreateSyncChangeRequest(syncKey, this.User2Information.InboxCollectionId, changeData);

            // Calls Sync command to update email with invalid sync request
            string insertTag = "</ApplicationData>";
            SendStringResponse result = this.EMAILAdapter.InvalidSync(syncRequest, invalidElement, insertTag);

            // Get status code
            return TestSuiteHelper.GetStatusCode(result.ResponseDataXML);
        }
        #endregion