use of org.isisaddons.module.freemarker.dom.service.FreeMarkerService in project estatio by estatio.
the class DocFragments_for_Invoicing_Test method setUp.
@Before
public void setUp() throws Exception {
clockService = new ClockService();
fake = new FakeDataService();
ReflectUtils.inject(fake, clockService);
fake.init();
freeMarkerService = new FreeMarkerService();
ReflectUtils.inject(freeMarkerService, "configurationService", mockConfigurationService);
final ImmutableMap<String, String> props = ImmutableMap.of();
freeMarkerService.init(props);
templateName = "Template name";
}
use of org.isisaddons.module.freemarker.dom.service.FreeMarkerService in project estatio by estatio.
the class DocumentTypeAndTemplatesFSForInvoicesUsingSsrs_Test method rendererForFreemarker.
private RendererForFreemarker rendererForFreemarker() throws NoSuchFieldException, IllegalAccessException {
final FreeMarkerService freeMarkerService = new FreeMarkerService();
final Field configurationServiceField = FreeMarkerService.class.getDeclaredField("configurationService");
configurationServiceField.setAccessible(true);
configurationServiceField.set(freeMarkerService, mockConfigurationService);
freeMarkerService.init(ImmutableMap.of());
final RendererForFreemarker renderer = new RendererForFreemarker();
final Field freeMarkerServiceField = RendererForFreemarker.class.getDeclaredField("freeMarkerService");
freeMarkerServiceField.setAccessible(true);
freeMarkerServiceField.set(renderer, freeMarkerService);
return renderer;
}
Aggregations