@Test public void testOnNotificationGridRefresh_emptyListStore() { NotificationGridRefreshEvent eventMock = mock(NotificationGridRefreshEvent.class); when(listStoreMock.size()).thenReturn(0); uut.onNotificationGridRefresh(eventMock); verify(toolbarViewMock).setDeleteAllButtonEnabled(eq(false)); }
@Override public void onNotificationGridRefresh(NotificationGridRefreshEvent event) { if (listStore.size() > 0) { toolbar.setDeleteAllButtonEnabled(true); } else { toolbar.setDeleteAllButtonEnabled(false); } }
NotificationPresenterImpl implements NotificationView.Presenter,
                                                  NotificationGridRefreshEvent.NotificationGridRefreshEventHandler,
                                                  NotificationSelectionEvent.NotificationSelectionEventHandler,
                                                  NotificationToolbarSelectionEvent.NotificationToolbarSelectionEventHandler,
                                                  NotificationToolbarDeleteClickedEvent.NotificationToolbarDeleteClickedEventHandler,
                                                  NotificationToolbarDeleteAllClickedEvent.NotificationToolbarDeleteAllClickedEventHandler { @Override public void onNotificationGridRefresh(NotificationGridRefreshEvent event) { if (listStore.size() > 0) { toolbar.setDeleteAllButtonEnabled(true); } else { toolbar.setDeleteAllButtonEnabled(false); } } }
NotificationPresenterImpl implements NotificationView.Presenter,
                                                  NotificationGridRefreshEvent.NotificationGridRefreshEventHandler,
                                                  NotificationSelectionEvent.NotificationSelectionEventHandler,
                                                  NotificationToolbarSelectionEvent.NotificationToolbarSelectionEventHandler,
                                                  NotificationToolbarDeleteClickedEvent.NotificationToolbarDeleteClickedEventHandler,
                                                  NotificationToolbarDeleteAllClickedEvent.NotificationToolbarDeleteAllClickedEventHandler { @Override public void onNotificationGridRefresh(NotificationGridRefreshEvent event) { if (listStore.size() > 0) { toolbar.setDeleteAllButtonEnabled(true); } else { toolbar.setDeleteAllButtonEnabled(false); } } @Inject  NotificationPresenterImpl(final NotificationViewFactory viewFactory,
                                     NotificationView.NotificationViewAppearance appearance,
                                     NotificationToolbarView toolbar,
                                     NotificationMessageProperties messageProperties); }
NotificationPresenterImpl implements NotificationView.Presenter,
                                                  NotificationGridRefreshEvent.NotificationGridRefreshEventHandler,
                                                  NotificationSelectionEvent.NotificationSelectionEventHandler,
                                                  NotificationToolbarSelectionEvent.NotificationToolbarSelectionEventHandler,
                                                  NotificationToolbarDeleteClickedEvent.NotificationToolbarDeleteClickedEventHandler,
                                                  NotificationToolbarDeleteAllClickedEvent.NotificationToolbarDeleteAllClickedEventHandler { @Override public void onNotificationGridRefresh(NotificationGridRefreshEvent event) { if (listStore.size() > 0) { toolbar.setDeleteAllButtonEnabled(true); } else { toolbar.setDeleteAllButtonEnabled(false); } } @Inject  NotificationPresenterImpl(final NotificationViewFactory viewFactory,
                                     NotificationView.NotificationViewAppearance appearance,
                                     NotificationToolbarView toolbar,
                                     NotificationMessageProperties messageProperties); @Override void onNotificationGridRefresh(NotificationGridRefreshEvent event); @Override FilterPagingLoadConfig buildDefaultLoadConfig(); @Override void filterBy(NotificationCategory category); @Override void onNotificationSelection(NotificationSelectionEvent event); @Override void go(HasOneWidget container); @Override void onNotificationToolbarDeleteAllClicked(NotificationToolbarDeleteAllClickedEvent event); @Override void onNotificationToolbarDeleteClicked(NotificationToolbarDeleteClickedEvent event); @Override void onNotificationToolbarSelection(NotificationToolbarSelectionEvent event); @Override void setRefreshButton(TextButton refreshBtn); @Override NotificationCategory getCurrentCategory(); }
NotificationPresenterImpl implements NotificationView.Presenter,
                                                  NotificationGridRefreshEvent.NotificationGridRefreshEventHandler,
                                                  NotificationSelectionEvent.NotificationSelectionEventHandler,
                                                  NotificationToolbarSelectionEvent.NotificationToolbarSelectionEventHandler,
                                                  NotificationToolbarDeleteClickedEvent.NotificationToolbarDeleteClickedEventHandler,
                                                  NotificationToolbarDeleteAllClickedEvent.NotificationToolbarDeleteAllClickedEventHandler { @Override public void onNotificationGridRefresh(NotificationGridRefreshEvent event) { if (listStore.size() > 0) { toolbar.setDeleteAllButtonEnabled(true); } else { toolbar.setDeleteAllButtonEnabled(false); } } @Inject  NotificationPresenterImpl(final NotificationViewFactory viewFactory,
                                     NotificationView.NotificationViewAppearance appearance,
                                     NotificationToolbarView toolbar,
                                     NotificationMessageProperties messageProperties); @Override void onNotificationGridRefresh(NotificationGridRefreshEvent event); @Override FilterPagingLoadConfig buildDefaultLoadConfig(); @Override void filterBy(NotificationCategory category); @Override void onNotificationSelection(NotificationSelectionEvent event); @Override void go(HasOneWidget container); @Override void onNotificationToolbarDeleteAllClicked(NotificationToolbarDeleteAllClickedEvent event); @Override void onNotificationToolbarDeleteClicked(NotificationToolbarDeleteClickedEvent event); @Override void onNotificationToolbarSelection(NotificationToolbarSelectionEvent event); @Override void setRefreshButton(TextButton refreshBtn); @Override NotificationCategory getCurrentCategory();  }