@Test public void processChosenDoesntThrowIfViewReturnsEmptyAndNoListenersRegistered() { given(view.getChosenProcess()).willReturn(Optional.empty()); presenter.processChosen(); }
@Override public void processChosen() { view.getChosenProcess() .ifPresent(proc -> processChosenCallbacks.forEach(c -> c.processChosen(proc))); }
ProcessListPresenter implements Presenter, ProcessListCallbacks { @Override public void processChosen() { view.getChosenProcess() .ifPresent(proc -> processChosenCallbacks.forEach(c -> c.processChosen(proc))); } }
ProcessListPresenter implements Presenter, ProcessListCallbacks { @Override public void processChosen() { view.getChosenProcess() .ifPresent(proc -> processChosenCallbacks.forEach(c -> c.processChosen(proc))); } ProcessListPresenter(ProcessListView view, ProcessListModel model); }
ProcessListPresenter implements Presenter, ProcessListCallbacks { @Override public void processChosen() { view.getChosenProcess() .ifPresent(proc -> processChosenCallbacks.forEach(c -> c.processChosen(proc))); } ProcessListPresenter(ProcessListView view, ProcessListModel model); @Override void processChosen(); @Override void updateRequested(); @Override void initialize(); void addProcessChosenListener(ProcessChosenEventListener callback); }
ProcessListPresenter implements Presenter, ProcessListCallbacks { @Override public void processChosen() { view.getChosenProcess() .ifPresent(proc -> processChosenCallbacks.forEach(c -> c.processChosen(proc))); } ProcessListPresenter(ProcessListView view, ProcessListModel model); @Override void processChosen(); @Override void updateRequested(); @Override void initialize(); void addProcessChosenListener(ProcessChosenEventListener callback);  }