use of org.activityinfo.shared.report.model.Report in project activityinfo by bedatadriven.
the class StaticElementRenderTest method testRtfRender.
@Test
public void testRtfRender() throws JAXBException, IOException {
Report r = getStatic();
RtfReportRenderer renderer = new RtfReportRenderer(TestGeometry.get(), "");
FileOutputStream fos = new FileOutputStream("target/report-tests/render-static" + renderer.getFileSuffix());
renderer.render(r, fos);
fos.close();
}
use of org.activityinfo.shared.report.model.Report in project activityinfo by bedatadriven.
the class StaticElementRenderTest method testHtmlRender.
@Test
public void testHtmlRender() throws JAXBException, IOException {
Report r = getStatic();
HtmlReportRenderer renderer = new HtmlReportRenderer(TestGeometry.get(), "", new NullStorageProvider());
FileOutputStream fos = new FileOutputStream("target/report-tests/render-static" + renderer.getFileSuffix());
renderer.render(r, fos);
fos.close();
}
use of org.activityinfo.shared.report.model.Report in project activityinfo by bedatadriven.
the class JaxbParseTest method testElements.
@Test
public void testElements() throws JAXBException {
Report report = parseXml("report-elements.xml");
dumpXml(report);
Assert.assertEquals("element count", 7, report.getElements().size());
Assert.assertTrue("pivotTable", report.getElements().get(0) instanceof PivotTableReportElement);
Assert.assertTrue("pivotChart", report.getElements().get(1) instanceof PivotChartReportElement);
Assert.assertTrue("table", report.getElements().get(2) instanceof TableElement);
Assert.assertTrue("map", report.getElements().get(3) instanceof MapReportElement);
Assert.assertTrue("static", report.getElements().get(4) instanceof TextReportElement);
Assert.assertTrue("static", report.getElements().get(5) instanceof TextReportElement);
Assert.assertTrue("static", report.getElements().get(6) instanceof ImageReportElement);
}
use of org.activityinfo.shared.report.model.Report in project activityinfo by bedatadriven.
the class JaxbParseTest method testTable.
@Test
public void testTable() throws Throwable {
Report report = parseXml("table.xml");
dumpXml(report);
TableElement table = report.getElement(0);
Assert.assertEquals("column count", 8, table.getRootColumn().getChildren().size());
// Assert.assertEquals(TableColumn.SortOrder.Descending,
// table.getSortBy().get(0).getOrder());
// Assert.assertEquals(TableColumn.SortOrder.Ascending,
// table.getSortBy().get(1).getOrder());
}
use of org.activityinfo.shared.report.model.Report in project activityinfo by bedatadriven.
the class JaxbParseTest method testReport.
@Test
public void testReport() throws JAXBException {
Report report = parseXml("report.xml");
Assert.assertEquals("My Title", report.getTitle());
}
Aggregations