Examples of SyncFolderItemsChangesType


Examples of com.microsoft.schemas.exchange.services.x2006.types.SyncFolderItemsChangesType

        SyncFolderItemsResponseType syncItemsResponse = mock(SyncFolderItemsResponseType.class);
        ArrayOfResponseMessagesType arrayOfResponseMessages = mock(ArrayOfResponseMessagesType.class);
        SyncFolderItemsResponseMessageType syncFolderItemsResponseMessage =
                mock(SyncFolderItemsResponseMessageType.class);
        SyncFolderItemsChangesType syncFolderItemsChanges = mock(SyncFolderItemsChangesType.class);

        LOG.debug("Expecting SyncFolderItems with User:{} Request:\n{}", folder.getUser(), syncItems);
        when(service.syncFolderItems(likeThis(syncItems), eq(folder.getUser()))).thenReturn(syncItemsResponse);
        when(syncItemsResponse.getResponseMessages()).thenReturn(arrayOfResponseMessages);
        when(arrayOfResponseMessages.getSyncFolderItemsResponseMessageArray())
                .thenReturn(new SyncFolderItemsResponseMessageType[]{syncFolderItemsResponseMessage});
        when(syncFolderItemsResponseMessage.getResponseCode()).thenReturn(ResponseCodeType.NO_ERROR);
        when(syncFolderItemsResponseMessage.isSetIncludesLastItemInRange()).thenReturn(true);
        when(syncFolderItemsResponseMessage.getIncludesLastItemInRange()).thenReturn(includesLastItemInRange);
        when(syncFolderItemsResponseMessage.isSetSyncState()).thenReturn(true);
        when(syncFolderItemsResponseMessage.getSyncState()).thenReturn(newSyncState);
        when(syncFolderItemsResponseMessage.isSetChanges()).thenReturn(true);
        when(syncFolderItemsResponseMessage.getChanges()).thenReturn(syncFolderItemsChanges);
        when(syncFolderItemsChanges.getCreateArray()).thenReturn(syncFolderItemsCreateOrUpdate);
    }
View Full Code Here

Examples of com.microsoft.schemas.exchange.services.x2006.types.SyncFolderItemsChangesType

        SyncFolderItemsResponseType syncItemsResponse = mock(SyncFolderItemsResponseType.class);
        ArrayOfResponseMessagesType arrayOfResponseMessages = mock(ArrayOfResponseMessagesType.class);
        SyncFolderItemsResponseMessageType syncFolderItemsResponseMessage =
                mock(SyncFolderItemsResponseMessageType.class);
        SyncFolderItemsChangesType syncFolderItemsChanges = mock(SyncFolderItemsChangesType.class);

        when(getService().syncFolderItems(likeThis(syncItems), eq(getDefaultFolder().getUser()))).
                thenReturn(syncItemsResponse);
        when(syncItemsResponse.getResponseMessages()).thenReturn(arrayOfResponseMessages);
        when(arrayOfResponseMessages.getSyncFolderItemsResponseMessageArray())
View Full Code Here

Examples of com.microsoft.schemas.exchange.services.x2006.types.SyncFolderItemsChangesType

        SyncFolderItemsResponseType syncItemsResponse = mock(SyncFolderItemsResponseType.class);
        ArrayOfResponseMessagesType arrayOfResponseMessages = mock(ArrayOfResponseMessagesType.class);
        SyncFolderItemsResponseMessageType syncFolderItemsResponseMessage =
                mock(SyncFolderItemsResponseMessageType.class);
        SyncFolderItemsChangesType syncFolderItemsChanges = mock(SyncFolderItemsChangesType.class);

        when(getService().syncFolderItems(likeThis(syncItems), eq(getDefaultFolder().getUser())))
                .thenReturn(syncItemsResponse);
        when(syncItemsResponse.getResponseMessages()).thenReturn(arrayOfResponseMessages);
        when(arrayOfResponseMessages.getSyncFolderItemsResponseMessageArray())
                .thenReturn(new SyncFolderItemsResponseMessageType[]{syncFolderItemsResponseMessage});
        when(syncFolderItemsResponseMessage.getResponseCode()).thenReturn(ResponseCodeType.NO_ERROR);
        when(syncFolderItemsResponseMessage.isSetIncludesLastItemInRange()).thenReturn(false);
        when(syncFolderItemsResponseMessage.isSetSyncState()).thenReturn(true);
        when(syncFolderItemsResponseMessage.getSyncState()).thenReturn(newSyncState);
        when(syncFolderItemsResponseMessage.isSetChanges()).thenReturn(true);
        when(syncFolderItemsResponseMessage.getChanges()).thenReturn(syncFolderItemsChanges);
        SyncFolderItemsCreateOrUpdateType[] creates = createSyncFolderItemsCreateArray(ids);
        when(syncFolderItemsChanges.getCreateArray()).thenReturn(creates);
        SyncFolderItemsResult result =
                SyncFolderItemsHelper.syncFolderItems(getService(), getDefaultConfig(), getDefaultFolder());
        Vector<String> expected = new Vector<String>(1);
        expected.add("onlyId");
        assertEquals(expected, result.getIds());
View Full Code Here

Examples of com.microsoft.schemas.exchange.services.x2006.types.SyncFolderItemsChangesType

        SyncFolderItemsResponseType syncItemsResponse = mock(SyncFolderItemsResponseType.class);
        ArrayOfResponseMessagesType arrayOfResponseMessages = mock(ArrayOfResponseMessagesType.class);
        SyncFolderItemsResponseMessageType syncFolderItemsResponseMessage =
                mock(SyncFolderItemsResponseMessageType.class);
        SyncFolderItemsChangesType syncFolderItemsChanges = mock(SyncFolderItemsChangesType.class);

        when(getService().syncFolderItems(likeThis(syncItems), eq(getDefaultFolder().getUser())))
                .thenReturn(syncItemsResponse);
        when(syncItemsResponse.getResponseMessages()).thenReturn(arrayOfResponseMessages);
        when(arrayOfResponseMessages.getSyncFolderItemsResponseMessageArray())
                .thenReturn(new SyncFolderItemsResponseMessageType[]{syncFolderItemsResponseMessage});
        when(syncFolderItemsResponseMessage.getResponseCode()).thenReturn(ResponseCodeType.NO_ERROR);
        when(syncFolderItemsResponseMessage.isSetIncludesLastItemInRange()).thenReturn(true);
        when(syncFolderItemsResponseMessage.getIncludesLastItemInRange()).thenReturn(false);
        when(syncFolderItemsResponseMessage.isSetSyncState()).thenReturn(false);
        when(syncFolderItemsResponseMessage.isSetChanges()).thenReturn(true);
        when(syncFolderItemsResponseMessage.getChanges()).thenReturn(syncFolderItemsChanges);
        SyncFolderItemsCreateOrUpdateType[] creates = createSyncFolderItemsCreateArray(ids);
        when(syncFolderItemsChanges.getCreateArray()).thenReturn(creates);
        SyncFolderItemsResult result =
                SyncFolderItemsHelper.syncFolderItems(getService(), getDefaultConfig(), getDefaultFolder());
        Vector<String> expected = new Vector<String>(1);
        expected.add("onlyId");
        assertEquals(expected, result.getIds());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.