@Test public void customViewAsWidgetTest() { PrintWidgetView customPrintWidgetViewMock = mock(PrintWidgetView.class); Widget customWidgetMock = mock(Widget.class); stub(customPrintWidgetViewMock.asWidget()).toReturn(customWidgetMock); printWidget = new PrintWidget(mapPresenterMock, "applicationId", customPrintWidgetViewMock); Assert.assertEquals(customWidgetMock, printWidget.asWidget()); }
@Override public Widget asWidget() { return presenter.getView().asWidget(); }
PrintWidget implements IsWidget { @Override public Widget asWidget() { return presenter.getView().asWidget(); } }
PrintWidget implements IsWidget { @Override public Widget asWidget() { return presenter.getView().asWidget(); } PrintWidget(MapPresenter mapPresenter, String applicationId);  PrintWidget(MapPresenter mapPresenter, String applicationId, PrintWidgetView view); }
PrintWidget implements IsWidget { @Override public Widget asWidget() { return presenter.getView().asWidget(); } PrintWidget(MapPresenter mapPresenter, String applicationId);  PrintWidget(MapPresenter mapPresenter, String applicationId, PrintWidgetView view); @Override Widget asWidget(); void registerLayerBuilder(PrintableLayerBuilder layerBuilder); void setTemplateBuilderFactory(TemplateBuilderFactory templateBuilderFactory); HandlerRegistration setPrintRequestHandler(PrintRequestHandler handler); }
PrintWidget implements IsWidget { @Override public Widget asWidget() { return presenter.getView().asWidget(); } PrintWidget(MapPresenter mapPresenter, String applicationId);  PrintWidget(MapPresenter mapPresenter, String applicationId, PrintWidgetView view); @Override Widget asWidget(); void registerLayerBuilder(PrintableLayerBuilder layerBuilder); void setTemplateBuilderFactory(TemplateBuilderFactory templateBuilderFactory); HandlerRegistration setPrintRequestHandler(PrintRequestHandler handler);  }