@Test public void dummyDataTest() { presenter.print(); captureServiceCallAndAssertTemplate(); }
@Override public void print() { if (mapPresenter != null) { PrintRequestInfo printRequestInfo = new PrintRequestInfo(); printRequestInfo.setPostPrintAction(view.getPostPrintAction()); printRequestInfo.setSync(view.isSync()); printRequestInfo.setDpi(view.getDpi()); printRequestInfo.setFileName(view.getFileName()); printRequestInfo.setPrintTemplateInfo(Print.getInstance().getPrintUtil(). createPrintTemplateInfo(mapPresenter, applicationId, templateBuilderFactory.createTemplateBuilder(mapBuilder), view.getTemplateBuilderDataProvider())); handlerManager.fireEvent(new PrintRequestStartedEvent(printRequestInfo)); Print.getInstance().getPrintService().print(printRequestInfo, new Callback<PrintFinishedInfo, Void>() { @Override public void onFailure(Void reason) { } @Override public void onSuccess(PrintFinishedInfo printFinishedInfo) { handlerManager.fireEvent(new PrintRequestFinishedEvent(printFinishedInfo)); } }); } }
PrintWidgetPresenterImpl implements PrintWidgetPresenter { @Override public void print() { if (mapPresenter != null) { PrintRequestInfo printRequestInfo = new PrintRequestInfo(); printRequestInfo.setPostPrintAction(view.getPostPrintAction()); printRequestInfo.setSync(view.isSync()); printRequestInfo.setDpi(view.getDpi()); printRequestInfo.setFileName(view.getFileName()); printRequestInfo.setPrintTemplateInfo(Print.getInstance().getPrintUtil(). createPrintTemplateInfo(mapPresenter, applicationId, templateBuilderFactory.createTemplateBuilder(mapBuilder), view.getTemplateBuilderDataProvider())); handlerManager.fireEvent(new PrintRequestStartedEvent(printRequestInfo)); Print.getInstance().getPrintService().print(printRequestInfo, new Callback<PrintFinishedInfo, Void>() { @Override public void onFailure(Void reason) { } @Override public void onSuccess(PrintFinishedInfo printFinishedInfo) { handlerManager.fireEvent(new PrintRequestFinishedEvent(printFinishedInfo)); } }); } } }
PrintWidgetPresenterImpl implements PrintWidgetPresenter { @Override public void print() { if (mapPresenter != null) { PrintRequestInfo printRequestInfo = new PrintRequestInfo(); printRequestInfo.setPostPrintAction(view.getPostPrintAction()); printRequestInfo.setSync(view.isSync()); printRequestInfo.setDpi(view.getDpi()); printRequestInfo.setFileName(view.getFileName()); printRequestInfo.setPrintTemplateInfo(Print.getInstance().getPrintUtil(). createPrintTemplateInfo(mapPresenter, applicationId, templateBuilderFactory.createTemplateBuilder(mapBuilder), view.getTemplateBuilderDataProvider())); handlerManager.fireEvent(new PrintRequestStartedEvent(printRequestInfo)); Print.getInstance().getPrintService().print(printRequestInfo, new Callback<PrintFinishedInfo, Void>() { @Override public void onFailure(Void reason) { } @Override public void onSuccess(PrintFinishedInfo printFinishedInfo) { handlerManager.fireEvent(new PrintRequestFinishedEvent(printFinishedInfo)); } }); } } PrintWidgetPresenterImpl(MapPresenter mapPresenter, String applicationId, PrintWidgetView view); }
PrintWidgetPresenterImpl implements PrintWidgetPresenter { @Override public void print() { if (mapPresenter != null) { PrintRequestInfo printRequestInfo = new PrintRequestInfo(); printRequestInfo.setPostPrintAction(view.getPostPrintAction()); printRequestInfo.setSync(view.isSync()); printRequestInfo.setDpi(view.getDpi()); printRequestInfo.setFileName(view.getFileName()); printRequestInfo.setPrintTemplateInfo(Print.getInstance().getPrintUtil(). createPrintTemplateInfo(mapPresenter, applicationId, templateBuilderFactory.createTemplateBuilder(mapBuilder), view.getTemplateBuilderDataProvider())); handlerManager.fireEvent(new PrintRequestStartedEvent(printRequestInfo)); Print.getInstance().getPrintService().print(printRequestInfo, new Callback<PrintFinishedInfo, Void>() { @Override public void onFailure(Void reason) { } @Override public void onSuccess(PrintFinishedInfo printFinishedInfo) { handlerManager.fireEvent(new PrintRequestFinishedEvent(printFinishedInfo)); } }); } } PrintWidgetPresenterImpl(MapPresenter mapPresenter, String applicationId, PrintWidgetView view); @Override void registerLayerBuilder(PrintableLayerBuilder layerBuilder); @Override PrintWidgetView getView(); @Override void setTemplateBuilderFactory(TemplateBuilderFactory templateBuilderFactory); @Override void print(); @Override HandlerRegistration setPrintRequestHandler(PrintRequestHandler handler); }
PrintWidgetPresenterImpl implements PrintWidgetPresenter { @Override public void print() { if (mapPresenter != null) { PrintRequestInfo printRequestInfo = new PrintRequestInfo(); printRequestInfo.setPostPrintAction(view.getPostPrintAction()); printRequestInfo.setSync(view.isSync()); printRequestInfo.setDpi(view.getDpi()); printRequestInfo.setFileName(view.getFileName()); printRequestInfo.setPrintTemplateInfo(Print.getInstance().getPrintUtil(). createPrintTemplateInfo(mapPresenter, applicationId, templateBuilderFactory.createTemplateBuilder(mapBuilder), view.getTemplateBuilderDataProvider())); handlerManager.fireEvent(new PrintRequestStartedEvent(printRequestInfo)); Print.getInstance().getPrintService().print(printRequestInfo, new Callback<PrintFinishedInfo, Void>() { @Override public void onFailure(Void reason) { } @Override public void onSuccess(PrintFinishedInfo printFinishedInfo) { handlerManager.fireEvent(new PrintRequestFinishedEvent(printFinishedInfo)); } }); } } PrintWidgetPresenterImpl(MapPresenter mapPresenter, String applicationId, PrintWidgetView view); @Override void registerLayerBuilder(PrintableLayerBuilder layerBuilder); @Override PrintWidgetView getView(); @Override void setTemplateBuilderFactory(TemplateBuilderFactory templateBuilderFactory); @Override void print(); @Override HandlerRegistration setPrintRequestHandler(PrintRequestHandler handler);  }