@Test public void canMoveToPreviousEditorInPluralForm() { // Given: current editor index is 1 presenter.setStatesForTesting(selectedTU.getId(), 1, display); // When: presenter.moveToPreviousEntry(); // Then: verify(display).focusEditor(0); verifyZeroInteractions(eventBus); }
@Test public void canMoveToPreviousEntry() { // Given: default current editor index is 0 TargetContentsPresenter spyPresenter = spy(presenter); doNothing().when(spyPresenter).savePendingChangesIfApplicable(); // When: spyPresenter.moveToPreviousEntry(); // Then: verify(spyPresenter).savePendingChangesIfApplicable(); verify(eventBus).fireEvent(NavTransUnitEvent.PREV_ENTRY_EVENT); }