Package org.openbravo.test.dal
Class ComputedColumnsTest
- java.lang.Object
-
- org.openbravo.test.base.MockableBaseTest
-
- org.openbravo.test.base.OBBaseTest
-
- org.openbravo.test.dal.ComputedColumnsTest
-
public class ComputedColumnsTest extends OBBaseTest
Set of tests for computed columns lazy loading- Author:
- alostale
-
-
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 ComputedColumnsTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
testComputedColumnCriteriaFilter()
Tests computed columns can not be used in OBCriteriavoid
testComputedColumnHQLFilter()
Test it is possible to filter in HQL by computed columns accessing them through the proxy.void
testComputedColumnHQLFilterOldWay()
Direct access to computed columns in HQL was allowed prior to MP27, now it is not anymore and proxy needs to be used.void
testJSONConverter()
Tests issue #25862 Computed columns for a new object should be null when converting to JSONvoid
testLazyLoad()
Tests computed columns are lazily loaded-
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
-
testLazyLoad
public void testLazyLoad()
Tests computed columns are lazily loaded
-
testComputedColumnHQLFilter
public void testComputedColumnHQLFilter()
Test it is possible to filter in HQL by computed columns accessing them through the proxy.Note this way of filtering is potentially harmful in terms of performance because computed column need to be calculated in order to do the filtering.
-
testComputedColumnCriteriaFilter
public void testComputedColumnCriteriaFilter()
Tests computed columns can not be used in OBCriteria
-
testComputedColumnHQLFilterOldWay
public void testComputedColumnHQLFilterOldWay()
Direct access to computed columns in HQL was allowed prior to MP27, now it is not anymore and proxy needs to be used.
-
testJSONConverter
public void testJSONConverter() throws org.codehaus.jettison.json.JSONException
Tests issue #25862 Computed columns for a new object should be null when converting to JSON- Throws:
org.codehaus.jettison.json.JSONException
-
-