presenter.onRevealDisplay();
}
@Test
public void willSetOptionsBackOnFilterViewCancelEvent() {
FilterViewEvent event =
new FilterViewEvent(true, true, true, true, true, false,
EditorFilter.ALL, true);
HistoryToken historyToken = new HistoryToken();
when(history.getHistoryToken()).thenReturn(historyToken);
presenter.onFilterView(event);
verify(display).setTranslatedFilter(event.isFilterUntranslated());
verify(display).setNeedReviewFilter(event.isFilterTranslated());
verify(display).setUntranslatedFilter(event.isFilterFuzzy());
verify(display).setApprovedFilter(event.isFilterApproved());
verify(display).setRejectedFilter(event.isFilterRejected());
assertThat(historyToken.isFilterUntranslated(),
Matchers.equalTo(event.isFilterUntranslated()));
assertThat(historyToken.isFilterTranslated(),
Matchers.equalTo(event.isFilterTranslated()));
assertThat(historyToken.isFilterFuzzy(),
Matchers.equalTo(event.isFilterFuzzy()));
assertThat(historyToken.isFilterApproved(),
Matchers.equalTo(event.isFilterApproved()));
assertThat(historyToken.isFilterRejected(),
Matchers.equalTo(event.isFilterRejected()));
assertThat(historyToken.isFilterHasError(),
Matchers.equalTo(event.isFilterHasError()));
}