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