@Test public void shouldAddExportParamToGetRidOfImageInHtmlReport() throws Exception { whenNew(JasperReportsMultiFormatView.class).withNoArguments().thenReturn(jasperReportsView); when(objectInputStream.readObject()).thenReturn(jasperReport); when(byteArrayOutputStream.toByteArray()).thenReturn(reportByteData); Map<JRExporterParameter, Object> exportParams = new HashMap<>(); exportParams.put(IS_USING_IMAGES_TO_ALIGN, false); viewFactory.getJasperReportsView(template); verify(jasperReportsView).setExporterParameters(exportParams); }
public JasperReportsMultiFormatView getJasperReportsView(Template template) throws IOException, ClassNotFoundException, JRException { JasperReportsMultiFormatView jasperView = new JasperReportsMultiFormatView(); setExportParams(jasperView); setDataSourceAndURLAndApplicationContext(template, jasperView); return jasperView; }
JasperReportsViewFactory { public JasperReportsMultiFormatView getJasperReportsView(Template template) throws IOException, ClassNotFoundException, JRException { JasperReportsMultiFormatView jasperView = new JasperReportsMultiFormatView(); setExportParams(jasperView); setDataSourceAndURLAndApplicationContext(template, jasperView); return jasperView; } }
JasperReportsViewFactory { public JasperReportsMultiFormatView getJasperReportsView(Template template) throws IOException, ClassNotFoundException, JRException { JasperReportsMultiFormatView jasperView = new JasperReportsMultiFormatView(); setExportParams(jasperView); setDataSourceAndURLAndApplicationContext(template, jasperView); return jasperView; }  }
JasperReportsViewFactory { public JasperReportsMultiFormatView getJasperReportsView(Template template) throws IOException, ClassNotFoundException, JRException { JasperReportsMultiFormatView jasperView = new JasperReportsMultiFormatView(); setExportParams(jasperView); setDataSourceAndURLAndApplicationContext(template, jasperView); return jasperView; }  JasperReportsMultiFormatView getJasperReportsView(Template template); String getReportURLForReportData(Template template); }
JasperReportsViewFactory { public JasperReportsMultiFormatView getJasperReportsView(Template template) throws IOException, ClassNotFoundException, JRException { JasperReportsMultiFormatView jasperView = new JasperReportsMultiFormatView(); setExportParams(jasperView); setDataSourceAndURLAndApplicationContext(template, jasperView); return jasperView; }  JasperReportsMultiFormatView getJasperReportsView(Template template); String getReportURLForReportData(Template template);  }