@Test public void testSetStateError() { presenter.setState(State.ERROR); verify(view, times(1)).setErrorState(State.ERROR.name()); }
public void setState(final State state) { if (state.equals(State.EXECUTING)) { view.setExecutingState(State.EXECUTING.name()); } else if (state.equals(State.DONE)) { view.setDoneState(State.DONE.name()); } else if (state.equals(State.ERROR)) { view.setErrorState(State.ERROR.name()); } else if (state.equals(State.STOPPED)) { view.setStoppedState(State.STOPPED.name()); } }
StagePresenter { public void setState(final State state) { if (state.equals(State.EXECUTING)) { view.setExecutingState(State.EXECUTING.name()); } else if (state.equals(State.DONE)) { view.setDoneState(State.DONE.name()); } else if (state.equals(State.ERROR)) { view.setErrorState(State.ERROR.name()); } else if (state.equals(State.STOPPED)) { view.setStoppedState(State.STOPPED.name()); } } }
StagePresenter { public void setState(final State state) { if (state.equals(State.EXECUTING)) { view.setExecutingState(State.EXECUTING.name()); } else if (state.equals(State.DONE)) { view.setDoneState(State.DONE.name()); } else if (state.equals(State.ERROR)) { view.setErrorState(State.ERROR.name()); } else if (state.equals(State.STOPPED)) { view.setStoppedState(State.STOPPED.name()); } } @Inject  StagePresenter(final View view); }
StagePresenter { public void setState(final State state) { if (state.equals(State.EXECUTING)) { view.setExecutingState(State.EXECUTING.name()); } else if (state.equals(State.DONE)) { view.setDoneState(State.DONE.name()); } else if (state.equals(State.ERROR)) { view.setErrorState(State.ERROR.name()); } else if (state.equals(State.STOPPED)) { view.setStoppedState(State.STOPPED.name()); } } @Inject  StagePresenter(final View view); @PostConstruct void init(); View getView(); void setup(final Stage stage); void setState(final State state); }
StagePresenter { public void setState(final State state) { if (state.equals(State.EXECUTING)) { view.setExecutingState(State.EXECUTING.name()); } else if (state.equals(State.DONE)) { view.setDoneState(State.DONE.name()); } else if (state.equals(State.ERROR)) { view.setErrorState(State.ERROR.name()); } else if (state.equals(State.STOPPED)) { view.setStoppedState(State.STOPPED.name()); } } @Inject  StagePresenter(final View view); @PostConstruct void init(); View getView(); void setup(final Stage stage); void setState(final State state);  }