Microsoft.Protocols.TestSuites.MS_ASCMD.S10_MoveItems.MSASCMD_S10_TC07_MoveItems_Status103 C# (CSharp) Method

MSASCMD_S10_TC07_MoveItems_Status103() private method

private MSASCMD_S10_TC07_MoveItems_Status103 ( ) : void
return void
        public void MSASCMD_S10_TC07_MoveItems_Status103()
        {
            Site.Assume.IsTrue(Common.IsRequirementEnabled(5671, this.Site), "Exchange 2007 does not limit the number of elements in command requests.");

            #region User2 sends mail to User1 and does FolderSync in User1's mailbox.
            string subject = this.SendMailAndFolderSync();
            #endregion

            #region Call method Sync to synchronize changes of Inbox folder in User1's mailbox between the client and the server, and get the ServerId of sent email item and the SyncKey
            SyncResponse syncResponseInbox = this.GetMailItem(this.User1Information.InboxCollectionId, subject);
            TestSuiteBase.RecordCaseRelativeItems(this.User1Information, this.User1Information.InboxCollectionId, subject);
            string syncKeyInbox = this.LastSyncKey;
            string serverId = TestSuiteBase.FindServerId(syncResponseInbox, "Subject", subject);
            #endregion

            #region Call method Sync to synchronize changes of DeletedItems folder in User1's mailbox between the client and the server, and get the SyncKey
            this.SyncChanges(this.User1Information.DeletedItemsCollectionId);
            string syncKeyDeletedItems = this.LastSyncKey;
            #endregion

            #region Call method MoveItems with the email item's ServerId to move the email item from Inbox folder to DeletedItems folder.
            Request.MoveItemsMove moveItemsMove = new Request.MoveItemsMove
            {
                DstFldId = this.User1Information.DeletedItemsCollectionId,
                SrcFldId = this.User1Information.InboxCollectionId,
                SrcMsgId = serverId
            };

            Request.MoveItems moveItems = new Request.MoveItems();
            moveItems.Move = new Request.MoveItemsMove[1001];
            for (int i = 0; i <= 1000; i++)
            {
                moveItems.Move[i] = moveItemsMove;
            }

            MoveItemsRequest request = new MoveItemsRequest();
            Request.MoveItems requestData = moveItems;
            request.RequestData = requestData;

            MoveItemsResponse moveItemsResponse = this.CMDAdapter.MoveItems(request);

            this.Site.CaptureRequirementIfAreEqual<int>(
                103,
                int.Parse(moveItemsResponse.ResponseData.Status),
                5653,
                @"[In Limiting Size of Command Requests] In MoveItems (section 2.2.2.11) command request, when the limit value of Move element is bigger than 1000 (minimum 1, maximum 2,147,483,647), the error returned by server is Status element (section 2.2.3.167.9) value of 103.");
            #endregion
        }
        #endregion