TerminalContainerPresenter implements TerminalContainer,
                                                   TerminalContainerView.ActionDelegate,
                                                   SelectionManager.SelectionChangeListener { @Override public void setVisible(boolean visible) { view.setVisible(visible); } @Inject  TerminalContainerPresenter(TerminalContainerView view,
                                      WidgetFactory widgetFactory,
                                      EventBus eventBus,
                                      final SelectionManager selectionManager); void onSelectionChanged(@NotNull Selection selection); @NotNull @Override IsWidget getView(); @Override void setVisible(boolean visible); @Override void go(AcceptsOneWidget container); @Override void update(@NotNull Runner runner); @Override void reset(); @Override void removeTerminalUrl(@NotNull Runner runner); @Override void setVisibleNoRunnerLabel(boolean isVisible);  }
@Test public void terminalIsNotRefreshedIfItIsNull() throws Exception { verify(eventBus).addHandler(Matchers.<Event.Type<RunnerApplicationStatusEventHandler>>anyObject(), appEventHandlerCaptor.capture()); RunnerApplicationStatusEventHandler handlerValue = appEventHandlerCaptor.getValue(); handlerValue.onRunnerStatusChanged(runner); verify(terminal, never()).setVisible(anyBoolean()); verify(terminal, never()).setUnavailableLabelVisible(anyBoolean()); verify(terminal, never()).setUrl(runner); }
@Test public void viewShouldBeVisible() { presenter.setVisible(true); view.setVisible(true); }
@Test public void viewShouldNotBeVisible() { presenter.setVisible(false); view.setVisible(false); }