@Test public void shouldHideParts() { when(toolingPartStack.containsPart(toolingPart)).thenReturn(true); when(informationPartStack.containsPart(informationPart)).thenReturn(true); when(editorPartStack.containsPart(editorPart)).thenReturn(true); when(navigationPartStack.containsPart(navigationPart)).thenReturn(true); workBenchPresenter.hidePart(toolingPart); workBenchPresenter.hidePart(informationPart); workBenchPresenter.hidePart(editorPart); workBenchPresenter.hidePart(navigationPart); verify(toolingPartStack).hidePart(toolingPart); verify(informationPartStack).hidePart(informationPart); verify(editorPartStack).hidePart(editorPart); verify(navigationPartStack).hidePart(navigationPart); reset(toolingPartStack); reset(informationPartStack); reset(editorPartStack); reset(navigationPartStack); workBenchPresenter.hidePart(toolingPart); workBenchPresenter.hidePart(informationPart); workBenchPresenter.hidePart(editorPart); workBenchPresenter.hidePart(navigationPart); verify(toolingPartStack, never()).hidePart(toolingPart); verify(informationPartStack, never()).hidePart(informationPart); verify(editorPartStack, never()).hidePart(editorPart); verify(navigationPartStack, never()).hidePart(navigationPart); }
public void hidePart(PartPresenter part) { PartStack destPartStack = findPartStackByPart(part); if (destPartStack != null) { destPartStack.hidePart(part); } }
WorkBenchPresenter implements Presenter { public void hidePart(PartPresenter part) { PartStack destPartStack = findPartStackByPart(part); if (destPartStack != null) { destPartStack.hidePart(part); } } }
WorkBenchPresenter implements Presenter { public void hidePart(PartPresenter part) { PartStack destPartStack = findPartStackByPart(part); if (destPartStack != null) { destPartStack.hidePart(part); } } @Inject  WorkBenchPresenter(WorkBenchViewImpl view,
                              EditorPartStack editorPartStackPresenter,
                              PartStackPresenterFactory stackPresenterFactory,
                              PartStackViewFactory partViewFactory,
                              OutlinePart outlinePart,
                              ProjectExplorerPart projectExplorerPart,
                              NotificationManager notificationManager,
                              HideWidgetCallback hideWidgetCallback); }
WorkBenchPresenter implements Presenter { public void hidePart(PartPresenter part) { PartStack destPartStack = findPartStackByPart(part); if (destPartStack != null) { destPartStack.hidePart(part); } } @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 { public void hidePart(PartPresenter part) { PartStack destPartStack = findPartStackByPart(part); if (destPartStack != null) { destPartStack.hidePart(part); } } @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);  }