Class ADOrgTreeTest
- java.lang.Object
-
- org.openbravo.test.base.OBBaseTest
-
- org.openbravo.test.db.model.functions.Ad_isorgincludedTest
-
- org.openbravo.test.db.model.functions.ADOrgTreeTest
-
public class ADOrgTreeTest extends Ad_isorgincludedTest
Tests related to AD_Org_Tree table
-
-
Field Summary
-
Fields inherited from class org.openbravo.test.db.model.functions.Ad_isorgincludedTest
CLIENT_FB, CLIENT_QA, ORG_0, ORG_FB_EAST, ORG_FB_FBGROUP, ORG_FB_NORTE, ORG_FB_SPAIN, ORG_FB_SUR, ORG_FB_US, ORG_FB_WEST, ORG_QA_MAIN, ORG_QA_SPAIN
-
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 ADOrgTreeTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
testCallAllCombinations()
Test all the possible combinations for calling AD_IsOrgIncluded function and compares the result to the original AD_IsOrgIncluded_TreeNodevoid
testChildOrgValidation()
Creates parent and child organization and tries to set as ready the child organization (cascade and not cascade).void
testCreateExtendedOrgTreeFewLevels()
Test we get expected records in AD_ORG_Tree table when the org tree has few levelsvoid
testCreateExtendedOrgTreeManyLevels()
Test we get expected records in AD_ORG_Tree table when the org tree has many levelsvoid
testIsOrgIncluded()
Case VI: Organization that does not exists.void
testPerformanceI()
Test performance of new function is better than legacy one when used as a filter criteria in the where clause.void
testPerformanceII()
Test performance of new function is equivalent to legacy one when using individually.void
testSingleNewOrganization()
Creates a new organization just below * and do not cascadevoid
testSingleNewOrganizationCascade()
Creates a new organization just below * and do cascadevoid
testTwoNewOrgsCascade()
Test creation of two new organizations (one below the other) and set as ready in Cascade: * |__firstOrg ___|__secondOrgvoid
testTwoNewOrgsIndividually()
Test creation of two new organizations (one below the other) and set as ready individually: * |__firstOrg ___|__secondOrg-
Methods inherited from class org.openbravo.test.db.model.functions.Ad_isorgincludedTest
callOrgIncludedFunction, isOrgIncluded
-
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
-
testIsOrgIncluded
public void testIsOrgIncluded()
Description copied from class:Ad_isorgincludedTest
Case VI: Organization that does not exists.- Overrides:
testIsOrgIncluded
in classAd_isorgincludedTest
-
testSingleNewOrganization
public void testSingleNewOrganization()
Creates a new organization just below * and do not cascade
-
testSingleNewOrganizationCascade
public void testSingleNewOrganizationCascade()
Creates a new organization just below * and do cascade
-
testTwoNewOrgsIndividually
public void testTwoNewOrgsIndividually()
Test creation of two new organizations (one below the other) and set as ready individually:- *
- |__firstOrg
- ___|__secondOrg
-
testTwoNewOrgsCascade
public void testTwoNewOrgsCascade()
Test creation of two new organizations (one below the other) and set as ready in Cascade:- *
- |__firstOrg
- ___|__secondOrg
-
testChildOrgValidation
public void testChildOrgValidation()
Creates parent and child organization and tries to set as ready the child organization (cascade and not cascade). Verify it fails because parent org is not set as ready yet
-
testCreateExtendedOrgTreeFewLevels
public void testCreateExtendedOrgTreeFewLevels()
Test we get expected records in AD_ORG_Tree table when the org tree has few levels
-
testCreateExtendedOrgTreeManyLevels
public void testCreateExtendedOrgTreeManyLevels()
Test we get expected records in AD_ORG_Tree table when the org tree has many levels
-
testCallAllCombinations
public void testCallAllCombinations()
Test all the possible combinations for calling AD_IsOrgIncluded function and compares the result to the original AD_IsOrgIncluded_TreeNode
-
testPerformanceI
public void testPerformanceI()
Test performance of new function is better than legacy one when used as a filter criteria in the where clause. Verify we get the same results.
-
testPerformanceII
public void testPerformanceII()
Test performance of new function is equivalent to legacy one when using individually. 300 consecutive calls done in a batch to have better range. Verify we get the same results
-
-