Search in sources :

Example 1 with MockHelper.mockBuilder

use of com.fsck.k9.MockHelper.mockBuilder in project k-9 by k9mail.

the class BaseNotificationsTest method createFakeController.

private NotificationController createFakeController() {
    Builder builder = MockHelper.mockBuilder(Builder.class);
    NotificationController controller = mock(NotificationController.class);
    when(controller.createNotificationBuilder()).thenReturn(builder);
    when(controller.getAccountName(any(Account.class))).thenReturn(ACCOUNT_NAME);
    return controller;
}
Also used : Account(com.fsck.k9.Account) Builder(android.support.v4.app.NotificationCompat.Builder)

Aggregations

Builder (android.support.v4.app.NotificationCompat.Builder)1 Account (com.fsck.k9.Account)1