Package org.openbravo.client.kernel.test
Class TemplateResolverTest
- java.lang.Object
-
- org.openbravo.test.base.MockableBaseTest
-
- org.openbravo.test.base.OBBaseTest
-
- org.openbravo.client.kernel.test.TemplateResolverTest
-
public class TemplateResolverTest extends OBBaseTest
Test theTemplateResolver
. Note the testcases assume that at least one template language (Template.getTemplateLanguage()
) is installed and at least one component type (Template.getComponentType()
) is available.- 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_INVOICE_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 TemplateResolverTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setUpT()
This before method is named setUpT() to avoid overwriting the super setUp method that is invoke automatically before this one.void
testResolveDependencies()
Tests template resolving with dependencies etc.void
testResolveDependenciesWithOverrides()
Tests dependencies and overrides.-
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, setUp, setUserContext, shouldMockServletContext, staticInitializeDalLayer, testDone
-
Methods inherited from class org.openbravo.test.base.MockableBaseTest
mockStatic
-
-
-
-
Method Detail
-
setUpT
public void setUpT() throws Exception
This before method is named setUpT() to avoid overwriting the super setUp method that is invoke automatically before this one.- Throws:
Exception
-
testResolveDependencies
public void testResolveDependencies() throws Exception
Tests template resolving with dependencies etc. The following test data is build up: Say there is dependency tree: A depends on B and C, B depends on D and E, C depends on F and G Then the returned result is computed depth-first: D, E, B, F, G, C, A- Throws:
Exception
-
testResolveDependenciesWithOverrides
public void testResolveDependenciesWithOverrides() throws Exception
Tests dependencies and overrides. The following test data is build up: Say there is dependency tree: A depends on B and C, B depends on D and E, C depends on F and G Then the B template is overridden by H which depends on I and J. Then the returned result is computed depth-first: I, J, H, F, G, C, A The last test overrides template A with a template K. The resolve should just return K.- Throws:
Exception
-
-