|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensubsystems.patterns.listdata.persist.db.ListDatabaseTestUtils
org.opensubsystems.security.patterns.listdata.persist.db.SecureListDatabaseTestUtils
public abstract class SecureListDatabaseTestUtils
Class used by JUnit tests derived from SecureListDatabaseFactoryTest class. Each such class should derive its own class from this class and implement all required methods. The functionality provided by the implemented methods it used to execute the generic tests for list pattern functionality. The idea is that the derived class specifies how to constructs the in memory tested data objects using two specified string values (here called column one and column two) and then specifies how to insert them to the database and how to delete them from the database. Then the generic tests using these specific methods as well as other utility methods from this class test list pattern implementation and behavior of the tested data object.
| Field Summary | |
|---|---|
protected static int[] |
EXTRA_TEST_DATA_DISTRIBUTION
How will be the extra data distributed between the extra domains. |
protected static int |
EXTRA_TEST_DATA_MULTIPLIER
How much more extra data should be inserted into additional domains to test both performance and correct functionality of list pattern in system with multiple domains. |
protected static int |
UNIT_OF_INSERTION
Name of the property containing value for number of insertion unit |
| Fields inherited from class org.opensubsystems.patterns.listdata.persist.db.ListDatabaseTestUtils |
|---|
m_arrAllColumnCodes, m_clsListDatabaseSchemaClass, m_clsListFactoryClass, m_iColumnOneCode, m_iColumnTwoCode, NO_PARENT |
| Constructor Summary | |
|---|---|
SecureListDatabaseTestUtils(java.lang.Class clsListFactoryClass,
java.lang.Class clsListDatabaseSchemaClass,
int[] arrAllColumnCodes,
int iColumnOneCode,
int iColumnTwoCode)
Constructor |
|
| Method Summary | |
|---|---|
protected void |
deleteMultiDomainLoadTestData(javax.transaction.UserTransaction transaction,
java.lang.Object[] insertedData)
Delete all data inserted for the load tests using the insertMulti DomainLoadTestData method. |
java.lang.Object[] |
insertMultiDomainLoadTestData(javax.transaction.UserTransaction transaction,
int iLoadTestListSize)
Insert multiple domain data records for load tests. |
| Methods inherited from class org.opensubsystems.patterns.listdata.persist.db.ListDatabaseTestUtils |
|---|
analyzeDatabase, constructData, createDataObject, createDataObjects, deleteData, deleteData, deleteDataObject, deleteDataObjects, deleteLoadTestData, deleteLoadTestData, deleteParent, deleteTestData, getAllColumnCodes, getColumnOneCode, getColumnOneValue, getColumnTwoCode, getColumnTwoValue, getDefaultListOptions, getDefaultResultListColumnTwo, getExpectedResultListColumnOne, getListDatabaseSchema, getListDatabaseSchemaClass, getListFactory, getListFactoryClass, insertData, insertLoadTestData, insertLoadTestData, insertMultipleData, insertParent, insertTestData, printDebug, printDebug |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final int EXTRA_TEST_DATA_MULTIPLIER
protected static final int[] EXTRA_TEST_DATA_DISTRIBUTION
protected static final int UNIT_OF_INSERTION
| Constructor Detail |
|---|
public SecureListDatabaseTestUtils(java.lang.Class clsListFactoryClass,
java.lang.Class clsListDatabaseSchemaClass,
int[] arrAllColumnCodes,
int iColumnOneCode,
int iColumnTwoCode)
clsListFactoryClass - - class representing database specific
ListFactory interface implementation for the
tested data objectarrAllColumnCodes - - array with codes for all columns that stores
data for the tested data objectiColumnOneCode - - Code that represents column storing the first
value used to generate the tested data object. It
is assumed that this code is part of
arrAllColumnCodes.iColumnTwoCode - - Code that represents column storing the second
value used to generate the tested data object. It
is assumed that this code is part of
arrAllColumnCodes.| Method Detail |
|---|
public final java.lang.Object[] insertMultiDomainLoadTestData(javax.transaction.UserTransaction transaction,
int iLoadTestListSize)
throws java.lang.Exception
transaction - - transaction to use to insert data or null if no
transaction should be used since the caller will
control the transactioniLoadTestListSize - - number of tested data objects to insert
java.lang.Exception - - an error has occured
protected void deleteMultiDomainLoadTestData(javax.transaction.UserTransaction transaction,
java.lang.Object[] insertedData)
throws java.lang.Exception
transaction - - transaction to use to delete data or null if no
transaction should be used since the caller will
control the transactioninsertedData - - data inserted by the insertMultiDomainLoadTestData
method that needs to be deleted
java.lang.Exception - - an error has occured
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||