| org.apache.openjpa.persistence.test.PersistenceTestCase org.apache.openjpa.persistence.test.SingleEMFTestCase org.apache.openjpa.persistence.test.SQLListenerTestCase
All known Subclasses: org.apache.openjpa.persistence.relations.TestEagerBidiSQL, org.apache.openjpa.persistence.jdbc.TestSelectForUpdateOverride, org.apache.openjpa.persistence.jdbc.TestIsolationLevelOverride, org.apache.openjpa.persistence.relations.TestLazyManyToOne, org.apache.openjpa.persistence.jdbc.TestOptimizeForClause, org.apache.openjpa.persistence.xmlmapping.query.TestXMLCustomerOrder, org.apache.openjpa.persistence.query.TestQueryPagination,
SQLListenerTestCase | abstract public class SQLListenerTestCase extends SingleEMFTestCase (Code) | | Base class for tests that need to check generated SQL.
author: Patrick Linskey |
Method Summary | |
public void | assertContainsSQL(String sqlExp) Confirm that the executed SQL String contains the specified sqlExp.
Parameters: sqlExp - the SQL expression. | public void | assertNotSQL(String sqlExp) Confirm that the specified SQL has not been executed.
Parameters: sqlExp - the SQL expression. | public void | assertSQL(String sqlExp) Confirm that the specified SQL has been executed.
Parameters: sqlExp - the SQL expression. | public int | getSQLCount() Gets the number of SQL issued since last reset. | public int | resetSQLCount() Resets SQL count. | public void | setUp(Object... props) |
sqlCount | protected int sqlCount(Code) | | |
assertContainsSQL | public void assertContainsSQL(String sqlExp)(Code) | | Confirm that the executed SQL String contains the specified sqlExp.
Parameters: sqlExp - the SQL expression. E.g., "SELECT BADCOLUMN .*" |
assertNotSQL | public void assertNotSQL(String sqlExp)(Code) | | Confirm that the specified SQL has not been executed.
Parameters: sqlExp - the SQL expression. E.g., "SELECT BADCOLUMN .*" |
assertSQL | public void assertSQL(String sqlExp)(Code) | | Confirm that the specified SQL has been executed.
Parameters: sqlExp - the SQL expression. E.g., "SELECT FOO .*" |
getSQLCount | public int getSQLCount()(Code) | | Gets the number of SQL issued since last reset.
|
resetSQLCount | public int resetSQLCount()(Code) | | Resets SQL count.
number of SQL counted since last reset. |
|
|