@BeforeClass public static void runOnceBeforeAllTests() throws JRException, IOException { // Load ArchiMate model ArchimateTestModel tm = new ArchimateTestModel(TestData.TEST_MODEL_FILE_ARCHISURANCE); model = tm.loadModel(); // Setup some folders exportFolder = TestUtils.createTempFolder("export"); tmpFolder = new File(exportFolder, "tmp"); tmpFolder.mkdirs(); // Create exporter exporter = new JasperReportsExporter( model, exportFolder, exportFileName, mainTemplateFile, reportTitle, 0); // Set up diagrams and Jasper Print once (expensive operation) exporter.writeDiagrams(tmpFolder); jasperPrint = exporter.createJasperPrint(null, tmpFolder); }
private Image getPrivateImageField() throws Exception { return (Image) TestUtils.getPrivateField(figure, "fImage"); }
@BeforeClass public static void runOnceBeforeAllTests() { // Calling Display.getDefault() will set Display.getCurrent() to non-null TestUtils.ensureDefaultDisplay(); }
// Need to ensure current display for ImageRegistry static { TestUtils.ensureDefaultDisplay(); }