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

CheckDeleteInSyncResponse() private method

This method is used to check the Delete element in Sync response.
private CheckDeleteInSyncResponse ( string syncKey, string collectionId, string serverId ) : bool
syncKey string The sync key
collectionId string Folder's collectionID
serverId string The ServerId of item which is expected to delete
return bool
        private bool CheckDeleteInSyncResponse(string syncKey, string collectionId, string serverId)
        {
            SyncResponse syncResponse = this.SyncChanges(syncKey, collectionId);
            Response.SyncCollectionsCollectionCommands commands = this.GetCommandsFromSyncResponse(syncResponse);

            Site.Assert.IsNotNull(commands.Delete, "The Delete elements in Sync response for collection ID: {0} should not be null.", collectionId);
            foreach (Response.SyncCollectionsCollectionCommandsDelete delete in commands.Delete)
            {
                Site.Assert.IsNotNull(delete, "The Delete element in Sync response for collection ID: {0} should not be null.", collectionId);
                if (serverId.Equals(delete.ServerId))
                {
                    return true;
                }
            }

            return false;
        }