Class FreemarkerTemplateProcessorTest
- java.lang.Object
-
- org.openbravo.test.base.OBBaseTest
-
- org.openbravo.base.weld.test.WeldBaseTest
-
- org.openbravo.client.kernel.freemarker.test.FreemarkerTemplateProcessorTest
-
public class FreemarkerTemplateProcessorTest extends WeldBaseTest
Test theFreemarkerTemplateProcessor
, tests both template validation as well as template processing. The test cases make use of the test templates present in the same package.- Author:
- mtaal
-
-
Field Summary
-
Fields inherited from class org.openbravo.test.base.OBBaseTest
DOLLAR, DOLLAR_ID, EURO, EURO_ID, QA_TEST_ADMIN_USER_ID, QA_TEST_CLIENT_ID, QA_TEST_ORG_ID, TEST_BP_CATEGORY_ID, TEST_CLIENT_ID, TEST_LOCATION_ID, TEST_ORDER_ID, TEST_ORG_ID, TEST_ORG_TREE, TEST_PRODUCT_ID, TEST_ROLE_ID, TEST_US_ORG_ID, TEST_USER_ID, TEST_WAREHOUSE_ID, TEST2_USER_ID, userIds, watchFailures
-
-
Constructor Summary
Constructors Constructor Description FreemarkerTemplateProcessorTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setUpFt()
void
testLenientTemplateProcessing()
Tests if the exception handler indeed works correctly and is lenient about undefined values.void
testTemplateReadCombineAndProcess()
Tests the test1, test2 and test3 templates.void
testTemplateValidation()
Tests theTemplateProcessor.validate(Template)
by passing in an invalid test cases: invalid_test.-
Methods inherited from class org.openbravo.base.weld.test.WeldBaseTest
createTestArchive, getWeldComponent, resetOBInterceptors, setUp
-
Methods inherited from class org.openbravo.test.base.OBBaseTest
addReadWriteAccess, classSetUp, commitTransaction, count, getConnectionProvider, getOneInstance, getRandomUser, getTestLogAppender, initializeDalLayer, initializeDisabledTestCases, initializeTestLogAppender, isErrorOccured, reportException, rollback, setLogStackTraces, setQAAdminContext, setSystemAdministratorContext, setTestAdminContext, setTestLogAppenderLevel, setTestUserContext, setUserContext, shouldMockServletContext, staticInitializeDalLayer, testDone
-
-
-
-
Method Detail
-
testTemplateReadCombineAndProcess
public void testTemplateReadCombineAndProcess() throws Exception
Tests the test1, test2 and test3 templates. The template files are converted into template objects, and then validated and processed using theTemplateProcessor
.- Throws:
Exception
-
testTemplateValidation
public void testTemplateValidation() throws Exception
Tests theTemplateProcessor.validate(Template)
by passing in an invalid test cases: invalid_test. This template has an invalid structure.- Throws:
Exception
-
testLenientTemplateProcessing
public void testLenientTemplateProcessing() throws Exception
Tests if the exception handler indeed works correctly and is lenient about undefined values. SeeTemplateProcessor
.- Throws:
Exception
-
-