Search in sources :

Example 1 with ContactGroup

use of com.zegoggles.smssync.contacts.ContactGroup in project sms-backup-plus by jberkel.

the class BackupTaskTest method shouldSkipItems.

@Test
public void shouldSkipItems() throws Exception {
    when(fetcher.getMostRecentTimestamp(any(DataType.class))).thenReturn(-23L);
    BackupState finalState = task.doInBackground(new BackupConfig(store, 0, 100, new ContactGroup(-1), BackupType.SKIP, EnumSet.of(SMS), false));
    verify(dataTypePreferences).setMaxSyncedDate(DataType.SMS, -23);
    verifyZeroInteractions(dataTypePreferences);
    assertThat(finalState).isNotNull();
    assertThat(finalState.isFinished()).isTrue();
}
Also used : BackupState(com.zegoggles.smssync.service.state.BackupState) DataType(com.zegoggles.smssync.mail.DataType) ContactGroup(com.zegoggles.smssync.contacts.ContactGroup) Test(org.junit.Test)

Aggregations

ContactGroup (com.zegoggles.smssync.contacts.ContactGroup)1 DataType (com.zegoggles.smssync.mail.DataType)1 BackupState (com.zegoggles.smssync.service.state.BackupState)1 Test (org.junit.Test)1