Package org.openbravo.test.dal
Class DalQueryTest
- java.lang.Object
-
- org.openbravo.test.base.OBBaseTest
-
- org.openbravo.test.dal.DalQueryTest
-
public class DalQueryTest extends OBBaseTest
Test different parts of the dal api:OBDal
,OBCriteria
andOBQuery
. Note the testcases assume that they are run in the order defined in this class.- 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 DalQueryTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
testADalFirstWhereLeftJoinClause()
Tests a left join withModelImplementation
as the main class.void
testBDalExtraJoinWhereLeftJoinClause()
Tests a left join withModelImplementation
as the main class.void
testCDalWhereLeftJoinClause()
Tests a left join withModelImplementation
as the main class.void
testDDalOtherWhereLeftJoinClause()
Tests a left join withModelImplementation
as the main class.void
testEDalAnOtherWhereLeftJoinClause()
Tests a left join withModelImplementation
as the main class.void
testFCreateBPGroup()
Test creates a newCategory
and saves it.void
testGRemoveBPGroup()
Test queries for the createdCategory
and removes it.void
testHCheckBPGroupRemoved()
Check that theCategory
was indeed removed.void
testIUpdateCurrencyByUser()
Tests queries for a currency and then updates it.void
testJTransaction25PageRead()
Tests a paged read of transactions and print of the identifier.-
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
-
-
-
-
Method Detail
-
testADalFirstWhereLeftJoinClause
public void testADalFirstWhereLeftJoinClause()
Tests a left join withModelImplementation
as the main class.
-
testBDalExtraJoinWhereLeftJoinClause
public void testBDalExtraJoinWhereLeftJoinClause()
Tests a left join withModelImplementation
as the main class.
-
testCDalWhereLeftJoinClause
public void testCDalWhereLeftJoinClause()
Tests a left join withModelImplementation
as the main class.
-
testDDalOtherWhereLeftJoinClause
public void testDDalOtherWhereLeftJoinClause()
Tests a left join withModelImplementation
as the main class.
-
testEDalAnOtherWhereLeftJoinClause
public void testEDalAnOtherWhereLeftJoinClause()
Tests a left join withModelImplementation
as the main class.
-
testFCreateBPGroup
public void testFCreateBPGroup()
Test creates a newCategory
and saves it. The new object is removed in the next test.
-
testGRemoveBPGroup
public void testGRemoveBPGroup()
Test queries for the createdCategory
and removes it.
-
testHCheckBPGroupRemoved
public void testHCheckBPGroupRemoved()
Check that theCategory
was indeed removed.
-
testIUpdateCurrencyByUser
public void testIUpdateCurrencyByUser()
Tests queries for a currency and then updates it. The test should fail as the user does not have update authorisation.
-
testJTransaction25PageRead
public void testJTransaction25PageRead()
Tests a paged read of transactions and print of the identifier. The identifier of a transaction has been implemented such that it reads all the references (which are non-null) and uses their identifier to create the identifier of the transaction. The test sorts on product.name.
-
-