Package org.openbravo.test.datasource
Class TestComboDatasource
- java.lang.Object
-
- org.openbravo.test.base.MockableBaseTest
-
- org.openbravo.test.base.OBBaseTest
-
- org.openbravo.test.datasource.BaseDataSourceTestDal
-
- org.openbravo.test.datasource.TestComboDatasource
-
public class TestComboDatasource extends BaseDataSourceTestDal
-
-
Field Summary
-
Fields inherited from class org.openbravo.test.datasource.BaseDataSourceTestDal
LOGIN, POST_METHOD, PWD
-
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 TestComboDatasource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
testAccess()
Test to check whether data is accessible to unauthorized user.void
testAccessForFilter()
Test to check whether filter data is accessible to unauthorized user.void
testDefaultNotInFirstPage()
Checks selected value not in 1st pagevoid
testFetchDataFromNonGrantedOrg()
void
testFetchWithLargeData()
Test to fetch values from ComboTableDatasoureService using set parameters.void
testFetchWithoutLimitParameters()
Test to fetch values from ComboTableDatasoureService using set parameters.void
testFilter()
Test to check filtering of the record using passed parametervoid
testFilterWithPagination()
Test to check filtering of the record using passed parameter and return paginated resultsvoid
testForIssue27612()
Test to check when empty value is rendered in UIDefinition, proper data is returned.void
testPaginatedFetch()
Test to fetch paginated values from ComboTableDatasoureServicevoid
testRequestWithoutFieldAccess()
Tests a request to a combo with a role that has no access to field entity.-
Methods inherited from class org.openbravo.test.datasource.BaseDataSourceTestDal
authenticate, changeProfile, doRequest, doRequest, doRequest, getLogin, getOpenbravoURL, getPassword, getSessionCsrfToken, logout
-
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
-
testFetchWithoutLimitParameters
public void testFetchWithoutLimitParameters() throws Exception
Test to fetch values from ComboTableDatasoureService using set parameters. Based on field information and current context, the field values are returned as jsonObject. The test case asserts the case where startRow and endRow parameters are not present. In this case OBException is raised- Throws:
Exception
-
testFetchWithLargeData
public void testFetchWithLargeData() throws Exception
Test to fetch values from ComboTableDatasoureService using set parameters. Based on field information and current context, the field values are returned as jsonObject. The test case asserts the case where more than 500 records are set to be fetched. In this case OBException is raised.- Throws:
Exception
-
testPaginatedFetch
public void testPaginatedFetch() throws Exception
Test to fetch paginated values from ComboTableDatasoureService- Throws:
Exception
-
testDefaultNotInFirstPage
public void testDefaultNotInFirstPage() throws Exception
Checks selected value not in 1st page- Throws:
Exception
-
testFilter
public void testFilter() throws Exception
Test to check filtering of the record using passed parameter- Throws:
Exception
-
testFilterWithPagination
public void testFilterWithPagination() throws Exception
Test to check filtering of the record using passed parameter and return paginated results- Throws:
Exception
-
testAccess
public void testAccess() throws Exception
Test to check whether data is accessible to unauthorized user.- Throws:
Exception
-
testAccessForFilter
public void testAccessForFilter() throws Exception
Test to check whether filter data is accessible to unauthorized user.- Throws:
Exception
-
testForIssue27612
public void testForIssue27612() throws Exception
Test to check when empty value is rendered in UIDefinition, proper data is returned.- Throws:
Exception
-
testRequestWithoutFieldAccess
public void testRequestWithoutFieldAccess() throws Exception
Tests a request to a combo with a role that has no access to field entity.- Throws:
Exception
-
-