@Test public void testGetDiagramImageWhenCanvasHandlerIsNotPresent() { when(graphUtils.getCurrentSession()).thenReturn(Optional.empty()); assertEquals(EMPTY, documentationFactory.getDiagramImage()); }
protected String getDiagramImage() { return getCanvasHandler() .map(canvasFileExport::exportToPng) .orElse(EMPTY); }
DMNDocumentationFactory { protected String getDiagramImage() { return getCanvasHandler() .map(canvasFileExport::exportToPng) .orElse(EMPTY); } }
DMNDocumentationFactory { protected String getDiagramImage() { return getCanvasHandler() .map(canvasFileExport::exportToPng) .orElse(EMPTY); } @Inject  DMNDocumentationFactory(final CanvasFileExport canvasFileExport,
                                   final TranslationService translationService,
                                   final DMNDocumentationDRDsFactory drdsFactory,
                                   final SessionInfo sessionInfo,
                                   final DMNGraphUtils graphUtils); }
DMNDocumentationFactory { protected String getDiagramImage() { return getCanvasHandler() .map(canvasFileExport::exportToPng) .orElse(EMPTY); } @Inject  DMNDocumentationFactory(final CanvasFileExport canvasFileExport,
                                   final TranslationService translationService,
                                   final DMNDocumentationDRDsFactory drdsFactory,
                                   final SessionInfo sessionInfo,
                                   final DMNGraphUtils graphUtils); DMNDocumentation create(final Diagram diagram); }
DMNDocumentationFactory { protected String getDiagramImage() { return getCanvasHandler() .map(canvasFileExport::exportToPng) .orElse(EMPTY); } @Inject  DMNDocumentationFactory(final CanvasFileExport canvasFileExport,
                                   final TranslationService translationService,
                                   final DMNDocumentationDRDsFactory drdsFactory,
                                   final SessionInfo sessionInfo,
                                   final DMNGraphUtils graphUtils); DMNDocumentation create(final Diagram diagram);  }