Package pl.matsuo.core.test
Class AbstractReportTest<E>
java.lang.Object
pl.matsuo.core.test.AbstractReportTest<E>
- All Implemented Interfaces:
PrintMethods
@Transactional
@ContextConfiguration(classes={pl.matsuo.core.conf.DbConfig.class,pl.matsuo.core.test.data.TestSessionState.class,ExecutionServiceImpl.class,TestDataExecutionConfig.class,UserTestData.class})
public abstract class AbstractReportTest<E>
extends Object
-
Field Summary
Fields Modifier and Type Field Description protected Databasedatabaseprotected FacadeBuilderfacadeBuilderprotected freemarker.template.ConfigurationfreeMarkerConfigurationprotected PrintsRendererServiceprintsRendererServiceprotected IReportService<E>reportServiceprotected SessionStatesessionStateprotected FiletargetDirectoryprotected StringtemplateDirectory -
Constructor Summary
Constructors Constructor Description AbstractReportTest() -
Method Summary
Modifier and Type Method Description protected Map<String,Object>buildModel(E params)Create print data model from object passed.IFacadeBuildergetFacadeBuilder()protected abstract StringgetPrintFileName()protected StringlookupTestName()voidsetupSessionState()protected CreatePdfResulttestCreatePDF(E params, BiConsumer<String,String>... verifications)Generate test print and validate it with verifications.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface pl.matsuo.core.service.print.PrintMethods
addElements, initializeFacade, initializeFacade, initializePrint, initializePrint
-
Field Details
-
sessionState
-
database
-
reportService
-
facadeBuilder
-
freeMarkerConfiguration
protected freemarker.template.Configuration freeMarkerConfiguration -
printsRendererService
-
templateDirectory
-
targetDirectory
-
-
Constructor Details
-
AbstractReportTest
public AbstractReportTest()
-
-
Method Details
-
buildModel
Create print data model from object passed. -
setupSessionState
public void setupSessionState() -
testCreatePDF
protected CreatePdfResult testCreatePDF(E params, BiConsumer<String,String>... verifications) throws ExceptionGenerate test print and validate it with verifications.- Throws:
Exception
-
lookupTestName
-
getPrintFileName
-
getFacadeBuilder
- Specified by:
getFacadeBuilderin interfacePrintMethods
-