Package org.openbravo.test.xml
Class EntityXMLImportTestReference
- java.lang.Object
-
- org.openbravo.test.base.OBBaseTest
-
- org.openbravo.test.xml.XMLBaseTest
-
- org.openbravo.test.xml.EntityXMLImportTestReference
-
public class EntityXMLImportTestReference extends XMLBaseTest
Test import of data for a business object (in this caseWarehouse
and its referenced information. A warehouse refers to aLocation
, the export exports both the warehouses as their locations. Then the tests check that both are inserted and then when the warehouses are reimported that the locations previously imported are re-used. Note that this test also tests the use of theReferenceDataStore
which is used to map id's used in the xml to the eventual id of the imported object in the database.- 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 EntityXMLImportTestReference()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setUpE()
This before method is named setUpE() to avoid overwriting the super setUp method that is invoke automatically before this one.void
test1Warehouse()
ExportsWarehouse
objects from client/orgOBBaseTest.TEST_CLIENT_ID
and imports them inOBBaseTest.QA_TEST_CLIENT_ID
.void
test2Warehouse()
Remove the importedWarehouse
objects from theOBBaseTest.QA_TEST_CLIENT_ID
client.void
test3Warehouse()
Repeat the action of importing theWarehouse
objects fromOBBaseTest.TEST_CLIENT_ID
.void
test4Warehouse()
Clean up by removing both the importedWarehouse
andLocation
objects fromOBBaseTest.QA_TEST_CLIENT_ID
client.-
Methods inherited from class org.openbravo.test.xml.XMLBaseTest
cleanRefDataLoaded, compare, getFileContent, getList, getList, getXML, getXML, getXML
-
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
-
setUpE
public void setUpE() throws Exception
This before method is named setUpE() to avoid overwriting the super setUp method that is invoke automatically before this one.- Throws:
Exception
-
test1Warehouse
public void test1Warehouse()
ExportsWarehouse
objects from client/orgOBBaseTest.TEST_CLIENT_ID
and imports them inOBBaseTest.QA_TEST_CLIENT_ID
. Also the referencedLocation
objects are imported.
-
test2Warehouse
public void test2Warehouse()
Remove the importedWarehouse
objects from theOBBaseTest.QA_TEST_CLIENT_ID
client. The importedLocation
objects should still remain.
-
test3Warehouse
public void test3Warehouse()
Repeat the action of importing theWarehouse
objects fromOBBaseTest.TEST_CLIENT_ID
. Now theLocation
objects are also exported but not imported as they already exist inOBBaseTest.QA_TEST_CLIENT_ID
.
-
test4Warehouse
public void test4Warehouse()
Clean up by removing both the importedWarehouse
andLocation
objects fromOBBaseTest.QA_TEST_CLIENT_ID
client.
-
-