Examples of SyncFolderItemsResult


Examples of com.ripariandata.timberwolf.mail.exchange.SyncFolderItemsHelper.SyncFolderItemsResult

        when(syncFolderItemsResponseMessage.isSetSyncState()).thenReturn(true);
        when(syncFolderItemsResponseMessage.getSyncState()).thenReturn(myNewSyncState);
        when(syncFolderItemsResponseMessage.isSetChanges()).thenReturn(false);


        SyncFolderItemsResult result = SyncFolderItemsHelper
                .syncFolderItems(getService(), getDefaultConfig(), getDefaultFolder());
        assertEquals(0, result.getIds().size());
        assertTrue(result.includesLastItem());
        assertEquals("", getDefaultFolder().getSyncStateToken());
        assertEquals(myNewSyncState, result.getSyncState());
    }
View Full Code Here

Examples of com.ripariandata.timberwolf.mail.exchange.SyncFolderItemsHelper.SyncFolderItemsResult

        creates[0] = mockCreateItem(ids.get(0));
        creates[1] = mock(SyncFolderItemsCreateOrUpdateType.class);
        when(creates[1].isSetMessage()).thenReturn(false);
        creates[2] = mockCreateItem(ids.get(2));
        mockSyncFolderItems(creates, getDefaultFolder(), getDefaultConfig().getIdPageSize(), newSyncState, true);
        SyncFolderItemsResult result =
                SyncFolderItemsHelper.syncFolderItems(getService(), getDefaultConfig(), getDefaultFolder());
        ids.remove(1);
        assertEquals(ids, result.getIds());
        assertTrue(result.includesLastItem());
        assertEquals(oldSyncState, getDefaultFolder().getSyncStateToken());
        assertEquals(newSyncState, result.getSyncState());
    }
View Full Code Here

Examples of com.ripariandata.timberwolf.mail.exchange.SyncFolderItemsHelper.SyncFolderItemsResult

        final MessageType message = mock(MessageType.class);
        when(creates[1].getMessage()).thenReturn(message);
        when(message.isSetItemId()).thenReturn(false);
        creates[2] = mockCreateItem(ids.get(2));
        mockSyncFolderItems(creates, getDefaultFolder(), getDefaultConfig().getIdPageSize(), newSyncState, true);
        SyncFolderItemsResult result =
                SyncFolderItemsHelper.syncFolderItems(getService(), getDefaultConfig(), getDefaultFolder());
        ids.remove(1);
        assertEquals(ids, result.getIds());
        assertTrue(result.includesLastItem());
        assertEquals(oldSyncState, getDefaultFolder().getSyncStateToken());
        assertEquals(newSyncState, result.getSyncState());
    }
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.