PropertiesPanelPresenter implements PropertiesPanelView.ActionDelegate, PropertiesPanel { @Override public void go(AcceptsOneWidget container) { container.setWidget(view); if (editor == null) { return; } editor.activate(); editor.onOpen(); if (editor.isDirty()) { enableSaveAndCancelButtons(); } } PropertiesPanelPresenter(@NotNull PropertiesPanelView view, @NotNull AppContext appContext); @Override void onConfigurationChanged(); @Override void go(AcceptsOneWidget container); @Override void update(@NotNull Runner runner); @Override void update(@NotNull Environment environment); @Override void addListener(@NotNull RemovePanelListener listener); @Override void hideButtonsPanel(); @Override void onCopyButtonClicked(); @Override void onSaveButtonClicked(); @Override void onDeleteButtonClicked(); @Override void onCancelButtonClicked(); @Override void onConfigLinkClicked(); void onSwitcherChanged(boolean isOn);  }
@Test public void presenterShouldGoneContainer() { AcceptsOneWidget container = mock(AcceptsOneWidget.class); presenter.go(container); verify(container).setWidget(view); }
@Test public void presenterShouldGoneContainerWhenEditorIsNull() { AcceptsOneWidget container = mock(AcceptsOneWidget.class); presenter.go(container); verify(container).setWidget(view); verify(editor, never()).activate(); verify(editor, never()).onOpen(); }