Fix the unit tests

This commit is contained in:
Sujan Kota 2019-01-14 10:41:44 -08:00
parent 64971007f5
commit 8e5e6d66a6

View file

@ -38,6 +38,7 @@ import com.fsck.k9.mailstore.OutboxStateRepository;
import com.fsck.k9.mailstore.SendState; import com.fsck.k9.mailstore.SendState;
import com.fsck.k9.mailstore.UnavailableStorageException; import com.fsck.k9.mailstore.UnavailableStorageException;
import com.fsck.k9.notification.NotificationController; import com.fsck.k9.notification.NotificationController;
import com.fsck.k9.notification.NotificationStrategy;
import com.fsck.k9.search.LocalSearch; import com.fsck.k9.search.LocalSearch;
import com.fsck.k9.search.SearchAccount; import com.fsck.k9.search.SearchAccount;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
@ -106,6 +107,8 @@ public class MessagingControllerTest extends K9RobolectricTest {
private LocalStore localStore; private LocalStore localStore;
@Mock @Mock
private NotificationController notificationController; private NotificationController notificationController;
@Mock
private NotificationStrategy notificationStrategy;
@Captor @Captor
private ArgumentCaptor<List<LocalFolder>> localFolderListCaptor; private ArgumentCaptor<List<LocalFolder>> localFolderListCaptor;
@Captor @Captor
@ -147,7 +150,8 @@ public class MessagingControllerTest extends K9RobolectricTest {
MockitoAnnotations.initMocks(this); MockitoAnnotations.initMocks(this);
appContext = RuntimeEnvironment.application; appContext = RuntimeEnvironment.application;
controller = new MessagingController(appContext, notificationController, localStoreProvider, contacts, controller = new MessagingController(appContext, notificationController, notificationStrategy,
localStoreProvider, contacts,
accountStatsCollector, mock(CoreResourceProvider.class), backendManager, accountStatsCollector, mock(CoreResourceProvider.class), backendManager,
Collections.<ControllerExtension>emptyList()); Collections.<ControllerExtension>emptyList());