SetExportFormatTask implements ReportParameterConfigurerTask { @Override public Map<String, Object> configure(ReportProps reportProps, ReportFormat reportFormat, JRDataSource datasource) { final Map<String, Object> parameters = newMap(); parameters.put(JasperReportsMultiFormatView.DEFAULT_FORMAT_KEY, reportFormat.getFormat()); return parameters; }  @Override Map<String, Object> configure(ReportProps reportProps,
			ReportFormat reportFormat, JRDataSource datasource);  }
@Test public void testConfigure_CSV() { final ReportFormat reportFormat = ReportFormat.CSV; final Map<String, Object> configure = sut.configure(reportProps, reportFormat, datasource); assertEquals(1, configure.size()); assertEquals(reportFormat.getFormat(), configure.get(JasperReportsMultiFormatView.DEFAULT_FORMAT_KEY)); }
@Test public void testConfigure_HTML() { final ReportFormat reportFormat = ReportFormat.HTML; final Map<String, Object> configure = sut.configure(reportProps, reportFormat, datasource); assertEquals(1, configure.size()); assertEquals(reportFormat.getFormat(), configure.get(JasperReportsMultiFormatView.DEFAULT_FORMAT_KEY)); }
@Test public void testConfigure_PDF() { final ReportFormat reportFormat = ReportFormat.PDF; final Map<String, Object> configure = sut.configure(reportProps, reportFormat, datasource); assertEquals(1, configure.size()); assertEquals(reportFormat.getFormat(), configure.get(JasperReportsMultiFormatView.DEFAULT_FORMAT_KEY)); }
@Test public void testConfigure_XLS() { final ReportFormat reportFormat = ReportFormat.XLS; final Map<String, Object> configure = sut.configure(reportProps, reportFormat, datasource); assertEquals(1, configure.size()); assertEquals(reportFormat.getFormat(), configure.get(JasperReportsMultiFormatView.DEFAULT_FORMAT_KEY)); }