use of com.fsck.k9.Account in project k-9 by k9mail.
the class NotificationIdsTest method getNewMailStackedNotificationId_withSecondAccount.
@Test
public void getNewMailStackedNotificationId_withSecondAccount() throws Exception {
Account account = createMockAccountWithAccountNumber(1);
int notificationIndex = 7;
int notificationId = NotificationIds.getNewMailStackedNotificationId(account, notificationIndex);
assertEquals(29, notificationId);
}
use of com.fsck.k9.Account in project k-9 by k9mail.
the class NotificationIdsTest method getAuthenticationErrorNotificationId_forIncomingServerWithSecondAccount.
@Test
public void getAuthenticationErrorNotificationId_forIncomingServerWithSecondAccount() throws Exception {
Account account = createMockAccountWithAccountNumber(1);
int notificationId = NotificationIds.getAuthenticationErrorNotificationId(account, INCOMING);
assertEquals(18, notificationId);
}
use of com.fsck.k9.Account in project k-9 by k9mail.
the class NotificationIdsTest method getCertificateErrorNotificationId_forIncomingServerWithSecondAccount.
@Test
public void getCertificateErrorNotificationId_forIncomingServerWithSecondAccount() throws Exception {
Account account = createMockAccountWithAccountNumber(1);
int notificationId = NotificationIds.getCertificateErrorNotificationId(account, INCOMING);
assertEquals(16, notificationId);
}
use of com.fsck.k9.Account in project k-9 by k9mail.
the class NotificationIdsTest method getAuthenticationErrorNotificationId_forOutgoingServerWithDefaultAccount.
@Test
public void getAuthenticationErrorNotificationId_forOutgoingServerWithDefaultAccount() throws Exception {
Account account = createMockAccountWithAccountNumber(0);
int notificationId = NotificationIds.getAuthenticationErrorNotificationId(account, OUTGOING);
assertEquals(4, notificationId);
}
use of com.fsck.k9.Account in project k-9 by k9mail.
the class SendFailedNotificationsTest method createFakeAccount.
private Account createFakeAccount() {
Account account = mock(Account.class);
when(account.getAccountNumber()).thenReturn(ACCOUNT_NUMBER);
when(account.getDescription()).thenReturn(ACCOUNT_NAME);
return account;
}
Aggregations