ConsoleContainerViewImpl extends Composite implements ConsoleContainerView { @Override public void setDelegate(ActionDelegate delegate) { this.delegate = delegate; } @Inject  ConsoleContainerViewImpl(RunnerResources resources,
                                    PartStackUIResources buttonIcons,
                                    ConsoleButtonFactory consoleButtonFactory,
                                    RunnerLocalizationConstant locale); @Override void setDelegate(ActionDelegate delegate); @Override void showWidget(@NotNull IsWidget console); @Override void removeWidget(@NotNull IsWidget console); @Override void selectWrapTextButton(boolean isChecked); @Override void setVisibleNoRunnerLabel(boolean visible);  }
@Test public void wrapTextButtonActionShouldBePerformed() throws Exception { verify(button1).setDelegate(delegateCaptor.capture()); ConsoleButton.ActionDelegate buttonDelegate = delegateCaptor.getValue(); buttonDelegate.onButtonClicked(); verify(delegate).onWrapTextClicked(); }
@Test public void cleanButtonActionShouldBePerformed() throws Exception { verify(button3).setDelegate(delegateCaptor.capture()); ConsoleButton.ActionDelegate buttonDelegate = delegateCaptor.getValue(); buttonDelegate.onButtonClicked(); verify(delegate).onCleanClicked(); }
@Test public void scrollBottomButtonActionShouldBePerformed() throws Exception { verify(button2).setDelegate(delegateCaptor.capture()); ConsoleButton.ActionDelegate buttonDelegate = delegateCaptor.getValue(); buttonDelegate.onButtonClicked(); verify(delegate).onScrollBottomClicked(); }