OnlyPaginatePdfTask implements ReportParameterConfigurerTask { @Override public Map<String, Object> configure(ReportProps reportProps, ReportFormat reportFormat, JRDataSource datasource) { final Map<String, Object> parameters = newMap(); if (!reportFormat.equals(PDF)) { parameters.put(JRParameter.IS_IGNORE_PAGINATION, Boolean.TRUE); } 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(configure.get(JRParameter.IS_IGNORE_PAGINATION), Boolean.TRUE); }
@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(configure.get(JRParameter.IS_IGNORE_PAGINATION), Boolean.TRUE); }
@Test public void testConfigure_PDF() { final ReportFormat reportFormat = ReportFormat.PDF; final Map<String, Object> configure = sut.configure(reportProps, reportFormat, datasource); assertEquals(0, configure.size()); }
@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(configure.get(JRParameter.IS_IGNORE_PAGINATION), Boolean.TRUE); }