use of com.fsck.k9.Account in project k-9 by k9mail.
the class NotificationIdsTest method getCertificateErrorNotificationId_forIncomingServerWithDefaultAccount.
@Test
public void getCertificateErrorNotificationId_forIncomingServerWithDefaultAccount() throws Exception {
Account account = createMockAccountWithAccountNumber(0);
int notificationId = NotificationIds.getCertificateErrorNotificationId(account, INCOMING);
assertEquals(1, notificationId);
}
use of com.fsck.k9.Account in project k-9 by k9mail.
the class NotificationIdsTest method getNewMailSummaryNotificationId_withSecondAccount.
@Test
public void getNewMailSummaryNotificationId_withSecondAccount() throws Exception {
Account account = createMockAccountWithAccountNumber(1);
int notificationId = NotificationIds.getNewMailSummaryNotificationId(account);
assertEquals(21, notificationId);
}
use of com.fsck.k9.Account in project k-9 by k9mail.
the class NotificationIdsTest method getNewMailStackedNotificationId_withTooLowIndex.
@Test(expected = IndexOutOfBoundsException.class)
public void getNewMailStackedNotificationId_withTooLowIndex() throws Exception {
Account account = createMockAccountWithAccountNumber(0);
NotificationIds.getNewMailStackedNotificationId(account, -1);
}
use of com.fsck.k9.Account in project k-9 by k9mail.
the class NotificationIdsTest method createMockAccountWithAccountNumber.
private Account createMockAccountWithAccountNumber(int accountNumber) {
Account account = mock(Account.class);
when(account.getAccountNumber()).thenReturn(accountNumber);
return account;
}
use of com.fsck.k9.Account in project k-9 by k9mail.
the class NotificationIdsTest method getNewMailStackedNotificationId_withDefaultAccount.
@Test
public void getNewMailStackedNotificationId_withDefaultAccount() throws Exception {
Account account = createMockAccountWithAccountNumber(0);
int notificationIndex = 0;
int notificationId = NotificationIds.getNewMailStackedNotificationId(account, notificationIndex);
assertEquals(7, notificationId);
}
Aggregations