@Test public void addFirstPartWithoutIconTest() { doReturn(null).when(part1).decorateIcon(any(SVGImage.class)); doReturn(item).when(view).addTab(null, partTitle1, toolTip1, null, true); int amountOfPartsBefore = presenter.getNumberOfParts(); presenter.addPart(part1); int amountOfPartsAfter = presenter.getNumberOfParts(); assertTrue(++amountOfPartsBefore == amountOfPartsAfter); verify(part1).addPropertyListener(any(PropertyListener.class)); verify(part1).getTitleSVGImage(); verify(view).addTab(null, partTitle1, toolTip1, null, true); verify(item).addCloseHandler(any(CloseHandler.class)); verify(part1).go(any(AcceptsOneWidget.class)); assertEquals(presenter.getActivePart(), part1); verify(view).setActiveTab(eq(0)); verify(partStackEventHandler).onRequestFocus(eq(presenter)); }
@Override public void addPart(PartPresenter part, Constraints constraint) { addPart(part); }
EditorPartStackPresenter extends PartStackPresenter implements EditorPartStack, ShowListButtonClickHandler { @Override public void addPart(PartPresenter part, Constraints constraint) { addPart(part); } }
EditorPartStackPresenter extends PartStackPresenter implements EditorPartStack, ShowListButtonClickHandler { @Override public void addPart(PartPresenter part, Constraints constraint) { addPart(part); } @Inject  EditorPartStackPresenter(final EditorPartStackView view, EventBus eventBus,
                                    PartStackEventHandler partStackEventHandler, ListOpenedFilesPresenter listOpenedFilesPresenter); }
EditorPartStackPresenter extends PartStackPresenter implements EditorPartStack, ShowListButtonClickHandler { @Override public void addPart(PartPresenter part, Constraints constraint) { addPart(part); } @Inject  EditorPartStackPresenter(final EditorPartStackView view, EventBus eventBus,
                                    PartStackEventHandler partStackEventHandler, ListOpenedFilesPresenter listOpenedFilesPresenter); @Override void addPart(PartPresenter part, Constraints constraint); @Override void addPart(PartPresenter part); @Override void setActivePart(PartPresenter part); @Override void onShowListClicked(int x, int y, AsyncCallback<Void> callback); }
EditorPartStackPresenter extends PartStackPresenter implements EditorPartStack, ShowListButtonClickHandler { @Override public void addPart(PartPresenter part, Constraints constraint) { addPart(part); } @Inject  EditorPartStackPresenter(final EditorPartStackView view, EventBus eventBus,
                                    PartStackEventHandler partStackEventHandler, ListOpenedFilesPresenter listOpenedFilesPresenter); @Override void addPart(PartPresenter part, Constraints constraint); @Override void addPart(PartPresenter part); @Override void setActivePart(PartPresenter part); @Override void onShowListClicked(int x, int y, AsyncCallback<Void> callback);  }