@Test public void testOnDownloadHtmlFile() { final String html = "<html><body>Hi</body></html>"; final String modelName = "model name"; doReturn(modelName).when(view).getCurrentDocumentationModelName(); doReturn(html).when(view).getCurrentDocumentationHTML(); view.onDownloadHtmlFile(mock(ClickEvent.class)); verify(view).getCurrentDocumentationHTML(); verify(downloadHelper).download(modelName, html); }
@EventHandler("download-html-file") public void onDownloadHtmlFile(final ClickEvent e) { final String html = getCurrentDocumentationHTML(); downloadHelper.download(getCurrentDocumentationModelName(), html); }
DMNDocumentationView extends DefaultDiagramDocumentationView { @EventHandler("download-html-file") public void onDownloadHtmlFile(final ClickEvent e) { final String html = getCurrentDocumentationHTML(); downloadHelper.download(getCurrentDocumentationModelName(), html); } }
DMNDocumentationView extends DefaultDiagramDocumentationView { @EventHandler("download-html-file") public void onDownloadHtmlFile(final ClickEvent e) { final String html = getCurrentDocumentationHTML(); downloadHelper.download(getCurrentDocumentationModelName(), html); } @Inject  DMNDocumentationView(final HTMLDivElement documentationPanel,
                                final HTMLDivElement documentationContent,
                                final HTMLButtonElement printButton,
                                final HTMLButtonElement downloadHtmlFile,
                                final PrintHelper printHelper,
                                final DMNDocumentationService documentationService,
                                final HTMLDownloadHelper downloadHelper,
                                final DMNDocumentationViewButtonsVisibilitySupplier buttonsVisibilitySupplier); }
DMNDocumentationView extends DefaultDiagramDocumentationView { @EventHandler("download-html-file") public void onDownloadHtmlFile(final ClickEvent e) { final String html = getCurrentDocumentationHTML(); downloadHelper.download(getCurrentDocumentationModelName(), html); } @Inject  DMNDocumentationView(final HTMLDivElement documentationPanel,
                                final HTMLDivElement documentationContent,
                                final HTMLButtonElement printButton,
                                final HTMLButtonElement downloadHtmlFile,
                                final PrintHelper printHelper,
                                final DMNDocumentationService documentationService,
                                final HTMLDownloadHelper downloadHelper,
                                final DMNDocumentationViewButtonsVisibilitySupplier buttonsVisibilitySupplier); @Override DocumentationView<Diagram> refresh(); @Override boolean isEnabled(); @EventHandler("print-button") void onPrintButtonClick(final ClickEvent e); @EventHandler("download-html-file") void onDownloadHtmlFile(final ClickEvent e); }
DMNDocumentationView extends DefaultDiagramDocumentationView { @EventHandler("download-html-file") public void onDownloadHtmlFile(final ClickEvent e) { final String html = getCurrentDocumentationHTML(); downloadHelper.download(getCurrentDocumentationModelName(), html); } @Inject  DMNDocumentationView(final HTMLDivElement documentationPanel,
                                final HTMLDivElement documentationContent,
                                final HTMLButtonElement printButton,
                                final HTMLButtonElement downloadHtmlFile,
                                final PrintHelper printHelper,
                                final DMNDocumentationService documentationService,
                                final HTMLDownloadHelper downloadHelper,
                                final DMNDocumentationViewButtonsVisibilitySupplier buttonsVisibilitySupplier); @Override DocumentationView<Diagram> refresh(); @Override boolean isEnabled(); @EventHandler("print-button") void onPrintButtonClick(final ClickEvent e); @EventHandler("download-html-file") void onDownloadHtmlFile(final ClickEvent e);  }