@Test public void shouldPresenterGo() { AcceptsOneWidget container = mock(AcceptsOneWidget.class); AcceptsOneWidget navigationPanel = mock(AcceptsOneWidget.class); AcceptsOneWidget editorPanel = mock(AcceptsOneWidget.class); AcceptsOneWidget toolPanel = mock(AcceptsOneWidget.class); AcceptsOneWidget informationPanel = mock(AcceptsOneWidget.class); when(view.getNavigationPanel()).thenReturn(navigationPanel); when(view.getEditorPanel()).thenReturn(editorPanel); when(view.getToolPanel()).thenReturn(toolPanel); when(view.getInformationPanel()).thenReturn(informationPanel); workBenchPresenter.go(container); verify(toolingPartStack).go(toolPanel); verify(informationPartStack).go(informationPanel); verify(editorPartStack).go(editorPanel); verify(navigationPartStack).go(navigationPanel); verify(container).setWidget(view); }
@Override public void go(AcceptsOneWidget container) { getPartStack(PartStackType.NAVIGATION).go(view.getNavigationPanel()); getPartStack(PartStackType.EDITING).go(view.getEditorPanel()); getPartStack(PartStackType.TOOLING).go(view.getToolPanel()); getPartStack(PartStackType.INFORMATION).go(view.getInformationPanel()); container.setWidget(view); }
WorkBenchPresenter implements Presenter { @Override public void go(AcceptsOneWidget container) { getPartStack(PartStackType.NAVIGATION).go(view.getNavigationPanel()); getPartStack(PartStackType.EDITING).go(view.getEditorPanel()); getPartStack(PartStackType.TOOLING).go(view.getToolPanel()); getPartStack(PartStackType.INFORMATION).go(view.getInformationPanel()); container.setWidget(view); } }
WorkBenchPresenter implements Presenter { @Override public void go(AcceptsOneWidget container) { getPartStack(PartStackType.NAVIGATION).go(view.getNavigationPanel()); getPartStack(PartStackType.EDITING).go(view.getEditorPanel()); getPartStack(PartStackType.TOOLING).go(view.getToolPanel()); getPartStack(PartStackType.INFORMATION).go(view.getInformationPanel()); container.setWidget(view); } @Inject  WorkBenchPresenter(WorkBenchViewImpl view,
                              EditorPartStack editorPartStackPresenter,
                              PartStackPresenterFactory stackPresenterFactory,
                              PartStackViewFactory partViewFactory,
                              OutlinePart outlinePart,
                              ProjectExplorerPart projectExplorerPart,
                              NotificationManager notificationManager,
                              HideWidgetCallback hideWidgetCallback); }
WorkBenchPresenter implements Presenter { @Override public void go(AcceptsOneWidget container) { getPartStack(PartStackType.NAVIGATION).go(view.getNavigationPanel()); getPartStack(PartStackType.EDITING).go(view.getEditorPanel()); getPartStack(PartStackType.TOOLING).go(view.getToolPanel()); getPartStack(PartStackType.INFORMATION).go(view.getInformationPanel()); container.setWidget(view); } @Inject  WorkBenchPresenter(WorkBenchViewImpl view,
                              EditorPartStack editorPartStackPresenter,
                              PartStackPresenterFactory stackPresenterFactory,
                              PartStackViewFactory partViewFactory,
                              OutlinePart outlinePart,
                              ProjectExplorerPart projectExplorerPart,
                              NotificationManager notificationManager,
                              HideWidgetCallback hideWidgetCallback); void removePart(PartPresenter part); void hidePart(PartPresenter part); void expandEditorPart(); void restoreEditorPart(); void setActivePart(PartPresenter part); void openPart(PartPresenter part, PartStackType type); void openPart(PartPresenter part, PartStackType type, Constraints constraint); @Override void go(AcceptsOneWidget container); }
WorkBenchPresenter implements Presenter { @Override public void go(AcceptsOneWidget container) { getPartStack(PartStackType.NAVIGATION).go(view.getNavigationPanel()); getPartStack(PartStackType.EDITING).go(view.getEditorPanel()); getPartStack(PartStackType.TOOLING).go(view.getToolPanel()); getPartStack(PartStackType.INFORMATION).go(view.getInformationPanel()); container.setWidget(view); } @Inject  WorkBenchPresenter(WorkBenchViewImpl view,
                              EditorPartStack editorPartStackPresenter,
                              PartStackPresenterFactory stackPresenterFactory,
                              PartStackViewFactory partViewFactory,
                              OutlinePart outlinePart,
                              ProjectExplorerPart projectExplorerPart,
                              NotificationManager notificationManager,
                              HideWidgetCallback hideWidgetCallback); void removePart(PartPresenter part); void hidePart(PartPresenter part); void expandEditorPart(); void restoreEditorPart(); void setActivePart(PartPresenter part); void openPart(PartPresenter part, PartStackType type); void openPart(PartPresenter part, PartStackType type, Constraints constraint); @Override void go(AcceptsOneWidget container);  }