com.mockrunner.jdbc
Class JDBCTestModule

java.lang.Object
  extended by com.mockrunner.jdbc.JDBCTestModule

public class JDBCTestModule
extends java.lang.Object

Module for JDBC tests.


Constructor Summary
JDBCTestModule(JDBCMockObjectFactory mockFactory)
           
 
Method Summary
 MockCallableStatement getCallableStatement(int index)
          Returns a MockCallableStatement that was created using a MockConnection by its index.
 MockCallableStatement getCallableStatement(java.lang.String sql)
          Returns a MockCallableStatement that was created using a MockConnection by its SQL statement.
 java.lang.Object getCallableStatementParameter(java.sql.CallableStatement statement, int indexOfParameter)
          Returns a parameter that was added to a CallableStatement using its set methods.
 java.lang.Object getCallableStatementParameter(java.sql.CallableStatement statement, java.lang.String nameOfParameter)
          Returns a parameter that was added to a CallableStatement using its set methods.
 java.lang.Object getCallableStatementParameter(int indexOfStatement, int indexOfParameter)
          Returns an object that was added to a CallableStatement using its set methods.
 java.lang.Object getCallableStatementParameter(int indexOfStatement, java.lang.String nameOfParameter)
          Returns an object that was added to a CallableStatement using its set methods.
 java.lang.Object getCallableStatementParameter(java.lang.String sql, int indexOfParameter)
          Returns a parameter that was added to a CallableStatement using its set methods.
 java.lang.Object getCallableStatementParameter(java.lang.String sql, java.lang.String nameOfParameter)
          Returns a parameter that was added to a CallableStatement using its set methods.
 CallableStatementResultSetHandler getCallableStatementResultSetHandler()
          Returns the CallableStatementResultSetHandler.
 java.util.List getCallableStatements()
          Returns all MockCallableStatement objects.
 java.util.List getCallableStatements(java.lang.String sql)
          Returns all MockCallableStatement objects with the specified SQL statement as a List.
 java.util.Map getExecutedSQLStatementParameter()
          Deprecated. use getExecutedSQLStatementParameterMap()
 java.util.Map getExecutedSQLStatementParameterMap()
          Returns a Map of all parameters that were used when executing a MockPreparedStatement or MockCallableStatement.
 ParameterSets getExecutedSQLStatementParameterSets(java.lang.String sql)
          Returns the ParameterSets object for the specified SQL statement.
 java.util.List getExecutedSQLStatements()
          Returns a List of all SQL statements that were executed by calling an execute method of a MockStatement, MockPreparedStatement or MockCallableStatement.
 MockPreparedStatement getPreparedStatement(int index)
          Returns a MockPreparedStatement that was created using a MockConnection by its index.
 MockPreparedStatement getPreparedStatement(java.lang.String sql)
          Returns a MockPreparedStatement that was created using a MockConnection by its SQL statement.
 java.lang.Object getPreparedStatementParameter(int indexOfStatement, int indexOfParameter)
          Returns an object that was added to a PreparedStatement using its set methods.
 java.lang.Object getPreparedStatementParameter(java.sql.PreparedStatement statement, int indexOfParameter)
          Returns a parameter that was added to a PreparedStatement using its set methods.
 java.lang.Object getPreparedStatementParameter(java.lang.String sql, int indexOfParameter)
          Returns a parameter that was added to a PreparedStatement using its set methods.
 PreparedStatementResultSetHandler getPreparedStatementResultSetHandler()
          Returns the PreparedStatementResultSetHandler.
 java.util.List getPreparedStatements()
          Returns all MockPreparedStatement objects.
 java.util.List getPreparedStatements(java.lang.String sql)
          Returns all MockPreparedStatement objects with the specified SQL statement as a List.
 MockResultSet getReturnedResultSet(java.lang.String id)
          Returns the ResultSet objects with the specified id.
 java.util.List getReturnedResultSets()
          Returns a List of all ResultSet objects that were returned by calling an executeQuery method of a MockStatement, MockPreparedStatement or MockCallableStatement.
 java.util.List getReturnedResultSets(java.lang.String id)
          Returns a List of the ResultSet objects with the specified id.
 MockSavepoint getSavepoint(int index)
          Returns the Savepoint with the specified index.
 MockSavepoint getSavepoint(java.lang.String name)
          Returns the first Savepoint with the specified name.
 java.util.List getSavepoints()
          Returns a list of all Savepoint objects.
 MockStatement getStatement(int index)
          Returns a MockStatement by its index.
 StatementResultSetHandler getStatementResultSetHandler()
          Returns the StatementResultSetHandler.
 java.util.List getStatements()
          Returns all MockStatement objects.
 void setCaseSensitive(boolean caseSensitive)
          Set if specified SQL statements should be handled case sensitive.
 void setExactMatch(boolean exactMatch)
          Set if specified SQL statements must match exactly.
 void setUseRegularExpressions(boolean useRegularExpressions)
          Set if regular expressions should be used when matching SQL statements.
 void verifyAllResultSetsClosed()
          Verifies that all ResultSet objects are closed.
 void verifyAllStatementsClosed()
          Verifies that all statements, all prepared statements and all callable statements are closed.
 void verifyCallableStatementClosed(int index)
          Verifies that a callable statement is closed.
 void verifyCallableStatementClosed(java.lang.String sql)
          Verifies that a callable statement is closed.
 void verifyCallableStatementNotPresent(java.lang.String sql)
          Verifies that a CallableStatement with the specified SQL statement is not present.
 void verifyCallableStatementOutParameterRegistered(java.sql.CallableStatement statement, int indexOfParameter)
          Verifies that an out parameter was registered on the specified CallableStatement.
 void verifyCallableStatementOutParameterRegistered(java.sql.CallableStatement statement, java.lang.String nameOfParameter)
          Verifies that an out parameter was registered on the specified CallableStatement.
 void verifyCallableStatementOutParameterRegistered(int indexOfStatement, int indexOfParameter)
          Verifies that an out parameter was registered on the CallableStatement with the specified index.
 void verifyCallableStatementOutParameterRegistered(int indexOfStatement, java.lang.String nameOfParameter)
          Verifies that an out parameter was registered on the CallableStatement with the specified index.
 void verifyCallableStatementOutParameterRegistered(java.lang.String sql, int indexOfParameter)
          Verifies that an out parameter was registered on the CallableStatement with the specified SQL.
 void verifyCallableStatementOutParameterRegistered(java.lang.String sql, java.lang.String nameOfParameter)
          Verifies that an out parameter was registered on the CallableStatement with the specified SQL.
 void verifyCallableStatementParameter(java.sql.CallableStatement statement, int indexOfParameter, java.lang.Object object)
          Verifies that a parameter from the specified CallableStatement is equal to the specified object.
 void verifyCallableStatementParameter(java.sql.CallableStatement statement, java.lang.String nameOfParameter, java.lang.Object object)
          Verifies that a parameter from the specified CallableStatement is equal to the specified object.
 void verifyCallableStatementParameter(int indexOfStatement, int indexOfParameter, java.lang.Object object)
          Verifies that a parameter from the CallableStatement with the specified SQL statement is equal to the specified object.
 void verifyCallableStatementParameter(int indexOfStatement, java.lang.String nameOfParameter, java.lang.Object object)
          Verifies that a parameter from the CallableStatement with the specified SQL statement is equal to the specified object.
 void verifyCallableStatementParameter(java.lang.String sql, int indexOfParameter, java.lang.Object object)
          Verifies that a parameter from the CallableStatement with the specified SQL statement is equal to the specified object.
 void verifyCallableStatementParameter(java.lang.String sql, java.lang.String nameOfParameter, java.lang.Object object)
          Verifies that a parameter from the CallableStatement with the specified SQL statement is equal to the specified object.
 void verifyCallableStatementParameterNotPresent(java.sql.CallableStatement statement, int indexOfParameter)
          Verifies that a parameter with the specified index is not present.
 void verifyCallableStatementParameterNotPresent(java.sql.CallableStatement statement, java.lang.String nameOfParameter)
          Verifies that a parameter with the specified index is not present.
 void verifyCallableStatementParameterNotPresent(int indexOfStatement, int indexOfParameter)
          Verifies that a parameter with the specified index is not present.
 void verifyCallableStatementParameterNotPresent(int indexOfStatement, java.lang.String nameOfParameter)
          Verifies that a parameter with the specified index is not present.
 void verifyCallableStatementParameterNotPresent(java.lang.String sql, int indexOfParameter)
          Verifies that a parameter with the specified index is not present.
 void verifyCallableStatementParameterNotPresent(java.lang.String sql, java.lang.String nameOfParameter)
          Verifies that a parameter with the specified index is not present.
 void verifyCallableStatementParameterPresent(java.sql.CallableStatement statement, int indexOfParameter)
          Verifies that a parameter was added to a CallableStatement with the specified index.
 void verifyCallableStatementParameterPresent(java.sql.CallableStatement statement, java.lang.String nameOfParameter)
          Verifies that a parameter was added to a CallableStatement with the specified index.
 void verifyCallableStatementParameterPresent(int indexOfStatement, int indexOfParameter)
          Verifies that a parameter was added to a CallableStatement with the specified index.
 void verifyCallableStatementParameterPresent(int indexOfStatement, java.lang.String nameOfParameter)
          Verifies that a parameter was added to a CallableStatement with the specified index.
 void verifyCallableStatementParameterPresent(java.lang.String sql, int indexOfParameter)
          Verifies that a parameter was added to a CallableStatement with the specified index.
 void verifyCallableStatementParameterPresent(java.lang.String sql, java.lang.String nameOfParameter)
          Verifies that a parameter was added to a CallableStatement with the specified index.
 void verifyCallableStatementPresent(java.lang.String sql)
          Verifies that a CallableStatement with the specified SQL statement is present.
 void verifyCommitted()
          Verifies that the changes were commited, i.e. the commit method of Connection was at least called once.
 void verifyConnectionClosed()
          Verifies that the connection is closed.
 void verifyNotCommitted()
          Verifies that the changes were not commited.
 void verifyNotRolledBack()
          Verifies that the changes were not rolled back.
 void verifyNumberCallableStatements(int number)
          Verifies the number of callable statements.
 void verifyNumberCallableStatements(int number, java.lang.String sql)
          Verifies the number of callable statements with the specified SQL.
 void verifyNumberCommits(int number)
          Verifies the number of commit calls.
 void verifyNumberPreparedStatements(int number)
          Verifies the number of prepared statements.
 void verifyNumberPreparedStatements(int number, java.lang.String sql)
          Verifies the number of prepared statements with the specified SQL.
 void verifyNumberRollbacks(int number)
          Verifies the number of rollback calls.
 void verifyNumberStatements(int number)
          Verifies the number of statements.
 void verifyPreparedStatementClosed(int index)
          Verifies that a prepared statement is closed.
 void verifyPreparedStatementClosed(java.lang.String sql)
          Verifies that a prepared statement is closed.
 void verifyPreparedStatementNotPresent(java.lang.String sql)
          Verifies that a PreparedStatement with the specified SQL statement is not present.
 void verifyPreparedStatementParameter(int indexOfStatement, int indexOfParameter, java.lang.Object object)
          Verifies that a parameter from the PreparedStatement with the specified SQL statement is equal to the specified object.
 void verifyPreparedStatementParameter(java.sql.PreparedStatement statement, int indexOfParameter, java.lang.Object object)
          Verifies that a parameter from the specified PreparedStatement is equal to the specified object.
 void verifyPreparedStatementParameter(java.lang.String sql, int indexOfParameter, java.lang.Object object)
          Verifies that a parameter from the PreparedStatement with the specified SQL statement is equal to the specified object.
 void verifyPreparedStatementParameterNotPresent(int indexOfStatement, int indexOfParameter)
          Verifies that a parameter with the specified index is not present.
 void verifyPreparedStatementParameterNotPresent(java.sql.PreparedStatement statement, int indexOfParameter)
          Verifies that a parameter with the specified index is not present.
 void verifyPreparedStatementParameterNotPresent(java.lang.String sql, int indexOfParameter)
          Verifies that a parameter with the specified index is not present.
 void verifyPreparedStatementParameterPresent(int indexOfStatement, int indexOfParameter)
          Verifies that a parameter was added to a PreparedStatement with the specified index.
 void verifyPreparedStatementParameterPresent(java.sql.PreparedStatement statement, int indexOfParameter)
          Verifies that a parameter was added to a PreparedStatement with the specified index.
 void verifyPreparedStatementParameterPresent(java.lang.String sql, int indexOfParameter)
          Verifies that a parameter was added to a PreparedStatement with the specified index.
 void verifyPreparedStatementPresent(java.lang.String sql)
          Verifies that a PreparedStatement with the specified SQL statement is present.
 void verifyResultSetClosed(java.lang.String id)
          Verifies that the ResultSet with the specified id is closed.
 void verifyResultSetColumn(MockResultSet resultSet, int number, java.util.List columnData)
          Verifies that a column of a ResultSet is equal to the entries in the specified List.
 void verifyResultSetColumn(MockResultSet resultSet, int number, java.lang.Object[] columnData)
          Verifies that a column of a ResultSet is equal to the entries in the specified array.
 void verifyResultSetColumn(MockResultSet resultSet, java.lang.String name, java.util.List columnData)
          Verifies that a column of a ResultSet is equal to the entries in the specified List.
 void verifyResultSetColumn(MockResultSet resultSet, java.lang.String name, java.lang.Object[] columnData)
          Verifies that a column of a ResultSet is equal to the entries in the specified array.
 void verifyResultSetColumn(java.lang.String id, int number, java.util.List columnData)
          Verifies that a column of a ResultSet is equal to the entries in the specified List.
 void verifyResultSetColumn(java.lang.String id, int number, java.lang.Object[] columnData)
          Verifies that a column of a ResultSet is equal to the entries in the specified array.
 void verifyResultSetColumn(java.lang.String id, java.lang.String name, java.util.List columnData)
          Verifies that a column of a ResultSet is equal to the entries in the specified List.
 void verifyResultSetColumn(java.lang.String id, java.lang.String name, java.lang.Object[] columnData)
          Verifies that a column of a ResultSet is equal to the entries in the specified array.
 void verifyResultSetEquals(MockResultSet source, MockResultSet target)
          Verifies that a ResultSet is equal to another one.
 void verifyResultSetEquals(java.lang.String id, MockResultSet target)
          Verifies that a ResultSet is equal to another one.
 void verifyResultSetRow(MockResultSet resultSet, int number, java.util.List rowData)
          Verifies that a row of a ResultSet is equal to the entries in the specified List.
 void verifyResultSetRow(MockResultSet resultSet, int number, java.lang.Object[] rowData)
          Verifies that a row of a ResultSet is equal to the entries in the specified array.
 void verifyResultSetRow(java.lang.String id, int number, java.util.List rowData)
          Verifies that a row of a ResultSet is equal to the entries in the specified List.
 void verifyResultSetRow(java.lang.String id, int number, java.lang.Object[] rowData)
          Verifies that a row of a ResultSet is equal to the entries in the specified array.
 void verifyResultSetRowDeleted(MockResultSet resultSet, int number)
          Verifies that the specified row of a ResultSet was deleted.
 void verifyResultSetRowDeleted(java.lang.String id, int number)
          Verifies that the specified row of a ResultSet was deleted.
 void verifyResultSetRowInserted(MockResultSet resultSet, int number)
          Verifies that the specified row of a ResultSet was inserted.
 void verifyResultSetRowInserted(java.lang.String id, int number)
          Verifies that the specified row of a ResultSet was inserted.
 void verifyResultSetRowNotDeleted(MockResultSet resultSet, int number)
          Verifies that the specified row of a ResultSet was not deleted.
 void verifyResultSetRowNotDeleted(java.lang.String id, int number)
          Verifies that the specified row of a ResultSet was not deleted.
 void verifyResultSetRowNotInserted(MockResultSet resultSet, int number)
          Verifies that the specified row of a ResultSet was not inserted.
 void verifyResultSetRowNotInserted(java.lang.String id, int number)
          Verifies that the specified row of a ResultSet was not inserted.
 void verifyResultSetRowNotUpdated(MockResultSet resultSet, int number)
          Verifies that the specified row of a ResultSet was not updated.
 void verifyResultSetRowNotUpdated(java.lang.String id, int number)
          Verifies that the specified row of a ResultSet was not updated.
 void verifyResultSetRowUpdated(MockResultSet resultSet, int number)
          Verifies that the specified row of a ResultSet was updated.
 void verifyResultSetRowUpdated(java.lang.String id, int number)
          Verifies that the specified row of a ResultSet was updated.
 void verifyRolledBack()
          Verifies that the changes were rolled back, i.e. the rollback method of Connection was at least called once.
 void verifySavepointNotReleased(int index)
          Verifies that the Savepoint with the specified index is not released.
 void verifySavepointNotReleased(java.lang.String name)
          Verifies that the Savepoint with the specified name is not released.
 void verifySavepointNotRollbacked(int index)
          Deprecated. use verifySavepointNotRolledBack(int)
 void verifySavepointNotRollbacked(java.lang.String name)
          Deprecated. use verifySavepointNotRolledBack(String)
 void verifySavepointNotRolledBack(int index)
          Verifies that the Savepoint with the specified index is not rolled back.
 void verifySavepointNotRolledBack(java.lang.String name)
          Verifies that the Savepoint with the specified name is not rolled back.
 void verifySavepointPresent(int index)
          Verifies that a Savepoint with the specified index is present.
 void verifySavepointPresent(java.lang.String name)
          Verifies that a Savepoint with the specified name is present.
 void verifySavepointReleased(int index)
          Verifies that the Savepoint with the specified index is released.
 void verifySavepointReleased(java.lang.String name)
          Verifies that the Savepoint with the specified name is released.
 void verifySavepointRollbacked(int index)
          Deprecated. use verifySavepointRolledBack(int)
 void verifySavepointRollbacked(java.lang.String name)
          Deprecated. use verifySavepointRolledBack(String)
 void verifySavepointRolledBack(int index)
          Verifies that the Savepoint with the specified index is rolled back.
 void verifySavepointRolledBack(java.lang.String name)
          Verifies that the Savepoint with the specified name is rolled back.
 void verifySQLStatementExecuted(java.lang.String sql)
          Verifies that an SQL statement was executed.
 void verifySQLStatementNotExecuted(java.lang.String sql)
          Verifies that an SQL statement was not executed.
 void verifySQLStatementParameter(java.lang.String sql, int indexOfParameterSet, int indexOfParameter, java.lang.Object expectedParameter)
          Verifies the parameter for the specified SQL statement.
 void verifySQLStatementParameter(java.lang.String sql, int indexOfParameterSet, java.util.Map parameterMap)
          Verifies the parameters for the specified SQL statement.
 void verifySQLStatementParameter(java.lang.String sql, int indexOfParameterSet, java.lang.String nameOfParameter, java.lang.Object expectedParameter)
          Verifies the parameter for the specified SQL statement.
 void verifySQLStatementParameterNumber(java.lang.String sql, int indexOfParameterSet, int number)
          Verifies the number of parameters for the specified SQL statement.
 void verifyStatementClosed(int index)
          Verifies that a statement is closed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDBCTestModule

public JDBCTestModule(JDBCMockObjectFactory mockFactory)
Method Detail

setCaseSensitive

public void setCaseSensitive(boolean caseSensitive)
Set if specified SQL statements should be handled case sensitive. Defaults to to false, i.e. INSERT is the same as insert. Please note that this method controls SQL statement matching for this class, e.g. what statements the method getPreparedStatements(String) returns or what statements are taken into account by the method verifySQLStatementExecuted(String). In contrast to AbstractResultSetHandler.setCaseSensitive(boolean) it does not control the prepared results that are returned when the tested application executes a matching statement.

Parameters:
caseSensitive - enable or disable case sensitivity

setExactMatch

public void setExactMatch(boolean exactMatch)
Set if specified SQL statements must match exactly. Defaults to false, i.e. the SQL statement used to create a PreparedStatement must contain the specified SQL statement, but does not have to match exactly. If the original statement is insert into mytable values(?, ?, ?) verifyPreparedStatementPresent("insert into mytable") will pass. Please note that this method controls SQL statement matching for this class, e.g. what statements the method getPreparedStatements(String) returns or what statements are taken into account by the method verifySQLStatementExecuted(String). In contrast to AbstractResultSetHandler.setExactMatch(boolean) it does not control the prepared results that are returned when the tested application executes a matching statement.

Parameters:
exactMatch - enable or disable exact matching

setUseRegularExpressions

public void setUseRegularExpressions(boolean useRegularExpressions)
Set if regular expressions should be used when matching SQL statements. Irrelevant if exactMatch is true. Default is false, i.e. you cannot use regular expressions and matching is based on string comparison. Please note that this method controls SQL statement matching for the methods of this class, e.g. what statements the method getPreparedStatements(String) returns or what statements are taken into account by the method verifySQLStatementExecuted(String). In contrast to AbstractResultSetHandler.setUseRegularExpressions(boolean) it does not control the prepared results that are returned when the tested application executes a matching statement.

Parameters:
useRegularExpressions - should regular expressions be used

getStatementResultSetHandler

public StatementResultSetHandler getStatementResultSetHandler()
Returns the StatementResultSetHandler. The StatementResultSetHandler contains methods that can be used to specify the MockResultSet objects and update counts that a MockStatement should return when executing an SQL statement.

Returns:
the StatementResultSetHandler

getPreparedStatementResultSetHandler

public PreparedStatementResultSetHandler getPreparedStatementResultSetHandler()
Returns the PreparedStatementResultSetHandler. The PreparedStatementResultSetHandler contains methods that can be used to specify the MockResultSet objects and update counts that a MockPreparedStatement should return when executing an SQL statement.

Returns:
the PreparedStatementResultSetHandler

getCallableStatementResultSetHandler

public CallableStatementResultSetHandler getCallableStatementResultSetHandler()
Returns the CallableStatementResultSetHandler. The CallableStatementResultSetHandler contains methods that can be used to specify the MockResultSet objects and update counts that a MockCallableStatement should return when executing an SQL statement.

Returns:
the CallableStatementResultSetHandler

getStatement

public MockStatement getStatement(int index)
Returns a MockStatement by its index.

Parameters:
index - the index of the Statement
Returns:
the Statement or null, if there is no such Statement

getStatements

public java.util.List getStatements()
Returns all MockStatement objects.

Returns:
the List of Statement objects

getExecutedSQLStatements

public java.util.List getExecutedSQLStatements()
Returns a List of all SQL statements that were executed by calling an execute method of a MockStatement, MockPreparedStatement or MockCallableStatement.

Returns:
the List of SQL statements

getExecutedSQLStatementParameter

public java.util.Map getExecutedSQLStatementParameter()
Deprecated. use getExecutedSQLStatementParameterMap()


getExecutedSQLStatementParameterMap

public java.util.Map getExecutedSQLStatementParameterMap()
Returns a Map of all parameters that were used when executing a MockPreparedStatement or MockCallableStatement. The keys are the corresponding SQL statements. The values are the ParameterSets objects.

Returns:
the Map of parameters

getExecutedSQLStatementParameterSets

public ParameterSets getExecutedSQLStatementParameterSets(java.lang.String sql)
Returns the ParameterSets object for the specified SQL statement. If more than one ParameterSets object is found, the first one will be returned.

Parameters:
sql - the the SQL statement
Returns:
the ParameterSets object or null if no matching object is found

getReturnedResultSet

public MockResultSet getReturnedResultSet(java.lang.String id)
Returns the ResultSet objects with the specified id. If there are more than one ResultSet objects with the specified id, the first one is returned. If there is no ResultSet with the specified id, this method returns null. Please also see getReturnedResultSets(String).

Returns:
the ResultSet with the specified id

getReturnedResultSets

public java.util.List getReturnedResultSets(java.lang.String id)
Returns a List of the ResultSet objects with the specified id. In contrast to getReturnedResultSets(java.lang.String), the returned List never contains ResultSet[] objects, only single result sets. If getReturnedResultSets(java.lang.String) returns an array, every ResultSet is checked and added to the returned List, if the id matches. Please note that ResultSet objects are cloned when executing statements. The ResultSet objects in the List returned by this method are really the instances the statement returned and not the instances you have used when preparing them.

Returns:
the List of ResultSet objects

getReturnedResultSets

public java.util.List getReturnedResultSets()
Returns a List of all ResultSet objects that were returned by calling an executeQuery method of a MockStatement, MockPreparedStatement or MockCallableStatement. Please note that the List may contain arrays of ResultSet objects, if a query returned multiple result sets. The List may contain ResultSet objects and ResultSet[] objects. If a query returned multiple result sets, the list will always contain the full array of ResultSet objects that were prepared, even if MockStatement.getMoreResults() was not called for all the result sets. Please note that ResultSet objects are cloned when executing statements. The ResultSet objects in the List returned by this method are really the instances the statement returned and not the instances you have used when preparing them.

Returns:
the List of ResultSet or ResultSet[] objects

getPreparedStatement

public MockPreparedStatement getPreparedStatement(int index)
Returns a MockPreparedStatement that was created using a MockConnection by its index.

Parameters:
index - the index of the PreparedStatement
Returns:
the PreparedStatement or null, if there is no such PreparedStatement

getPreparedStatement

public MockPreparedStatement getPreparedStatement(java.lang.String sql)
Returns a MockPreparedStatement that was created using a MockConnection by its SQL statement. If there are more than one MockPreparedStatement objects with the specified SQL, the first one will be returned. Please note that you can modify the search parameters with setCaseSensitive(boolean), setExactMatch(boolean) and setUseRegularExpressions(boolean).

Parameters:
sql - the SQL statement used to create the PreparedStatement
Returns:
the PreparedStatement or null, if there is no macth

getPreparedStatements

public java.util.List getPreparedStatements()
Returns all MockPreparedStatement objects.

Returns:
the List of PreparedStatement objects

getPreparedStatements

public java.util.List getPreparedStatements(java.lang.String sql)
Returns all MockPreparedStatement objects with the specified SQL statement as a List. If there are no matches, an empty List will be returned. Please note that you can modify the search parameters with setCaseSensitive(boolean), setExactMatch(boolean) and setUseRegularExpressions(boolean).

Parameters:
sql - the SQL statement used to create the PreparedStatement
Returns:
the List of PreparedStatement objects

getCallableStatement

public MockCallableStatement getCallableStatement(int index)
Returns a MockCallableStatement that was created using a MockConnection by its index.

Parameters:
index - the index of the CallableStatement
Returns:
the CallableStatement or null, if there is no such CallableStatement

getCallableStatement

public MockCallableStatement getCallableStatement(java.lang.String sql)
Returns a MockCallableStatement that was created using a MockConnection by its SQL statement. If there are more than one MockCallableStatement objects with the specified SQL, the first one will be returned. Please note that you can modify the search parameters with setCaseSensitive(boolean), setExactMatch(boolean) and setUseRegularExpressions(boolean).

Parameters:
sql - the SQL statement used to create the CallableStatement
Returns:
the CallableStatement or null, if there is no macth

getCallableStatements

public java.util.List getCallableStatements()
Returns all MockCallableStatement objects.

Returns:
the List of CallableStatement objects

getCallableStatements

public java.util.List getCallableStatements(java.lang.String sql)
Returns all MockCallableStatement objects with the specified SQL statement as a List. If there are no matches, an empty List will be returned. Please note that you can modify the search parameters with setCaseSensitive(boolean), setExactMatch(boolean) and setUseRegularExpressions(boolean).

Parameters:
sql - the SQL statement used to create the CallableStatement
Returns:
the List of CallableStatement objects

getPreparedStatementParameter

public java.lang.Object getPreparedStatementParameter(java.sql.PreparedStatement statement,
                                                      int indexOfParameter)
Returns a parameter that was added to a PreparedStatement using its set methods. Simple data types are returned as the corresponsing wrapper type.

Parameters:
statement - the PreparedStatement
indexOfParameter - the index used to set the parameter
Returns:
the corresponding object

getPreparedStatementParameter

public java.lang.Object getPreparedStatementParameter(java.lang.String sql,
                                                      int indexOfParameter)
Returns a parameter that was added to a PreparedStatement using its set methods. Uses the first PreparedStatement with the specified SQL statement. Simple data types are returned as the corresponsing wrapper type.

Parameters:
sql - the SQL statement
indexOfParameter - the index used to set the object
Returns:
the corresponding object

getPreparedStatementParameter

public java.lang.Object getPreparedStatementParameter(int indexOfStatement,
                                                      int indexOfParameter)
Returns an object that was added to a PreparedStatement using its set methods. Simple data types are returned as the corresponsing wrapper type.

Parameters:
indexOfStatement - the index of the statement
indexOfParameter - the index used to set the object
Returns:
the corresponding object

getCallableStatementParameter

public java.lang.Object getCallableStatementParameter(java.sql.CallableStatement statement,
                                                      int indexOfParameter)
Returns a parameter that was added to a CallableStatement using its set methods. Simple data types are returned as the corresponsing wrapper type.

Parameters:
statement - the CallableStatement
indexOfParameter - the index used to set the parameter
Returns:
the corresponding object

getCallableStatementParameter

public java.lang.Object getCallableStatementParameter(java.lang.String sql,
                                                      int indexOfParameter)
Returns a parameter that was added to a CallableStatement using its set methods. Uses the first CallableStatement with the specified SQL statement. Simple data types are returned as the corresponsing wrapper type.

Parameters:
sql - the SQL statement
indexOfParameter - the index used to set the object
Returns:
the corresponding object

getCallableStatementParameter

public java.lang.Object getCallableStatementParameter(int indexOfStatement,
                                                      int indexOfParameter)
Returns an object that was added to a CallableStatement using its set methods. Simple data types are returned as the corresponsing wrapper type.

Parameters:
indexOfStatement - the index of the statement
indexOfParameter - the index used to set the object
Returns:
the corresponding object

getCallableStatementParameter

public java.lang.Object getCallableStatementParameter(java.sql.CallableStatement statement,
                                                      java.lang.String nameOfParameter)
Returns a parameter that was added to a CallableStatement using its set methods.

Parameters:
statement - the CallableStatement
nameOfParameter - the name of the parameter
Returns:
the corresponding object

getCallableStatementParameter

public java.lang.Object getCallableStatementParameter(java.lang.String sql,
                                                      java.lang.String nameOfParameter)
Returns a parameter that was added to a CallableStatement using its set methods. Uses the first CallableStatement with the specified SQL statement.

Parameters:
sql - the SQL statement
nameOfParameter - the name of the parameter
Returns:
the corresponding object

getCallableStatementParameter

public java.lang.Object getCallableStatementParameter(int indexOfStatement,
                                                      java.lang.String nameOfParameter)
Returns an object that was added to a CallableStatement using its set methods.

Parameters:
indexOfStatement - the index of the statement
nameOfParameter - the name of the parameter
Returns:
the corresponding object

getSavepoints

public java.util.List getSavepoints()
Returns a list of all Savepoint objects.

Returns:
the List of MockSavepoint objects

getSavepoint

public MockSavepoint getSavepoint(int index)
Returns the Savepoint with the specified index. The index is the number of the created Savepoint starting with 0 for the first Savepoint.

Parameters:
index - the index
Returns:
the MockSavepoint

getSavepoint

public MockSavepoint getSavepoint(java.lang.String name)
Returns the first Savepoint with the specified name. Unnamed Savepoint objects get the name "".

Parameters:
name - the name
Returns:
the MockSavepoint

verifySQLStatementExecuted

public void verifySQLStatementExecuted(java.lang.String sql)
Verifies that an SQL statement was executed.

Parameters:
sql - the expected SQL string
Throws:
VerifyFailedException - if verification fails

verifySQLStatementNotExecuted

public void verifySQLStatementNotExecuted(java.lang.String sql)
Verifies that an SQL statement was not executed.

Parameters:
sql - the SQL string
Throws:
VerifyFailedException - if verification fails

verifySQLStatementParameterNumber

public void verifySQLStatementParameterNumber(java.lang.String sql,
                                              int indexOfParameterSet,
                                              int number)
Verifies the number of parameters for the specified SQL statement. If more than one SQL statement is found, this method uses the first one. You can specify the index of the parameter set. If if a PreparedStatement or CallableStatement is executed N times, it has N parameter sets. Each parameter set can contain any number of parameters (possibly 0 parameters). Ordinary statements do not have parameter sets, of course. If the specified SQL has been executed by an ordinary statements, a VerifyFailedException is thrown stating the reason.

Parameters:
sql - the SQL string
indexOfParameterSet - the number of the parameter set
number - the expected number of parameters
Throws:
VerifyFailedException - if verification fails

verifySQLStatementParameter

public void verifySQLStatementParameter(java.lang.String sql,
                                        int indexOfParameterSet,
                                        java.util.Map parameterMap)
Verifies the parameters for the specified SQL statement. If more than one SQL statement is found, this method uses the first one. The parameter map must match in size and the parameters must be equal (by comparing them with {com.mockrunner.jdbc.ParameterUtil#compareParameter}). You can specify the index of the parameter set. If if a PreparedStatement or CallableStatement is executed N times, it has N parameter sets. Each parameter set can contain any number of parameters (possibly 0 parameters). Ordinary statements do not have parameter sets, of course. If the specified SQL has been executed by an ordinary statements, a VerifyFailedException is thrown stating the reason.

Parameters:
sql - the SQL string
indexOfParameterSet - the number of the parameter set
parameterMap - the map of expected parameters
Throws:
VerifyFailedException - if verification fails

verifySQLStatementParameter

public void verifySQLStatementParameter(java.lang.String sql,
                                        int indexOfParameterSet,
                                        int indexOfParameter,
                                        java.lang.Object expectedParameter)
Verifies the parameter for the specified SQL statement. If more than one SQL statement is found, this method uses the first one. You can specify the index of the parameter set. If if a PreparedStatement or CallableStatement is executed N times, it has N parameter sets. Each parameter set can contain any number of parameters (possibly 0 parameters). Ordinary statements do not have parameter sets, of course. If the specified SQL has been executed by an ordinary statements, a VerifyFailedException is thrown stating the reason.

Parameters:
sql - the SQL string
indexOfParameterSet - the number of the parameter set
indexOfParameter - the index of the parameter
expectedParameter - the expected parameter
Throws:
VerifyFailedException - if verification fails

verifySQLStatementParameter

public void verifySQLStatementParameter(java.lang.String sql,
                                        int indexOfParameterSet,
                                        java.lang.String nameOfParameter,
                                        java.lang.Object expectedParameter)
Verifies the parameter for the specified SQL statement. If more than one SQL statement is found, this method uses the first one. You can specify the index of the parameter set. If if a PreparedStatement or CallableStatement is executed N times, it has N parameter sets. Each parameter set can contain any number of parameters (possibly 0 parameters). Ordinary statements do not have parameter sets, of course. If the specified SQL has been executed by an ordinary statements, a VerifyFailedException is thrown stating the reason.

Parameters:
sql - the SQL string
indexOfParameterSet - the number of the parameter set
nameOfParameter - the name of the parameter
expectedParameter - the expected parameter
Throws:
VerifyFailedException - if verification fails

verifyConnectionClosed

public void verifyConnectionClosed()
Verifies that the connection is closed.

Throws:
VerifyFailedException - if verification fails

verifyAllStatementsClosed

public void verifyAllStatementsClosed()
Verifies that all statements, all prepared statements and all callable statements are closed.

Throws:
VerifyFailedException - if verification fails

verifyResultSetClosed

public void verifyResultSetClosed(java.lang.String id)
Verifies that the ResultSet with the specified id is closed. Only recognizes ResultSet objects that were actually returned when executing a statement and that were explicitly closed. Implicit closed ResultSet objects (when closing a statement) are not recognized.

Throws:
VerifyFailedException - if verification fails

verifyResultSetRowInserted

public void verifyResultSetRowInserted(MockResultSet resultSet,
                                       int number)
Verifies that the specified row of a ResultSet was inserted.

Parameters:
resultSet - the ResultSet
number - the number of the row
Throws:
VerifyFailedException - if verification fails

verifyResultSetRowInserted

public void verifyResultSetRowInserted(java.lang.String id,
                                       int number)
Verifies that the specified row of a ResultSet was inserted.

Parameters:
id - the id of the ResultSet
number - the number of the row
Throws:
VerifyFailedException - if verification fails

verifyResultSetRowNotInserted

public void verifyResultSetRowNotInserted(MockResultSet resultSet,
                                          int number)
Verifies that the specified row of a ResultSet was not inserted.

Parameters:
resultSet - the ResultSet
number - the number of the row
Throws:
VerifyFailedException - if verification fails

verifyResultSetRowNotInserted

public void verifyResultSetRowNotInserted(java.lang.String id,
                                          int number)
Verifies that the specified row of a ResultSet was not inserted.

Parameters:
id - the id of the ResultSet
number - the number of the row
Throws:
VerifyFailedException - if verification fails

verifyResultSetRowUpdated

public void verifyResultSetRowUpdated(MockResultSet resultSet,
                                      int number)
Verifies that the specified row of a ResultSet was updated.

Parameters:
resultSet - the ResultSet
number - the number of the row
Throws:
VerifyFailedException - if verification fails

verifyResultSetRowUpdated

public void verifyResultSetRowUpdated(java.lang.String id,
                                      int number)
Verifies that the specified row of a ResultSet was updated.

Parameters:
id - the id of the ResultSet
number - the number of the row
Throws:
VerifyFailedException - if verification fails

verifyResultSetRowNotUpdated

public void verifyResultSetRowNotUpdated(MockResultSet resultSet,
                                         int number)
Verifies that the specified row of a ResultSet was not updated.

Parameters:
resultSet - the ResultSet
number - the number of the row
Throws:
VerifyFailedException - if verification fails

verifyResultSetRowNotUpdated

public void verifyResultSetRowNotUpdated(java.lang.String id,
                                         int number)
Verifies that the specified row of a ResultSet was not updated.

Parameters:
id - the id of the ResultSet
number - the number of the row
Throws:
VerifyFailedException - if verification fails

verifyResultSetRowDeleted

public void verifyResultSetRowDeleted(MockResultSet resultSet,
                                      int number)
Verifies that the specified row of a ResultSet was deleted.

Parameters:
resultSet - the ResultSet
number - the number of the row
Throws:
VerifyFailedException - if verification fails

verifyResultSetRowDeleted

public void verifyResultSetRowDeleted(java.lang.String id,
                                      int number)
Verifies that the specified row of a ResultSet was deleted.

Parameters:
id - the id of the ResultSet
number - the number of the row
Throws:
VerifyFailedException - if verification fails

verifyResultSetRowNotDeleted

public void verifyResultSetRowNotDeleted(MockResultSet resultSet,
                                         int number)
Verifies that the specified row of a ResultSet was not deleted.

Parameters:
resultSet - the ResultSet
number - the number of the row
Throws:
VerifyFailedException - if verification fails

verifyResultSetRowNotDeleted

public void verifyResultSetRowNotDeleted(java.lang.String id,
                                         int number)
Verifies that the specified row of a ResultSet was not deleted.

Parameters:
id - the id of the ResultSet
number - the number of the row
Throws:
VerifyFailedException - if verification fails

verifyAllResultSetsClosed

public void verifyAllResultSetsClosed()
Verifies that all ResultSet objects are closed. Only recognizes ResultSet objects that were actually returned when executing a statement and that were explicitly closed. Implicit closed ResultSet objects (when closing a statement) are not recognized.

Throws:
VerifyFailedException - if verification fails

verifyCommitted

public void verifyCommitted()
Verifies that the changes were commited, i.e. the commit method of Connection was at least called once. Makes only sense, if the Connection is not in autocommit mode. Automatic commits are not recognized.

Throws:
VerifyFailedException - if verification fails

verifyNotCommitted

public void verifyNotCommitted()
Verifies that the changes were not commited. Makes only sense, if the Connection is not in autocommit mode. Automatic commits are not recognized.

Throws:
VerifyFailedException - if verification fails

verifyRolledBack

public void verifyRolledBack()
Verifies that the changes were rolled back, i.e. the rollback method of Connection was at least called once. Makes only sense, if the Connection is not in autocommit mode.

Throws:
VerifyFailedException - if verification fails

verifyNotRolledBack

public void verifyNotRolledBack()
Verifies that the changes were not rolled back. Makes only sense, if the Connection is not in autocommit mode.

Throws:
VerifyFailedException - if verification fails

verifyNumberCommits

public void verifyNumberCommits(int number)
Verifies the number of commit calls. Makes only sense, if the Connection is not in autocommit mode.

Parameters:
number - the expected number of commits
Throws:
VerifyFailedException - if verification fails

verifyNumberRollbacks

public void verifyNumberRollbacks(int number)
Verifies the number of rollback calls. Makes only sense, if the Connection is not in autocommit mode.

Parameters:
number - the expected number of rollbacks
Throws:
VerifyFailedException - if verification fails

verifyNumberStatements

public void verifyNumberStatements(int number)
Verifies the number of statements.

Parameters:
number - the expected number
Throws:
VerifyFailedException - if verification fails

verifyNumberPreparedStatements

public void verifyNumberPreparedStatements(int number)
Verifies the number of prepared statements.

Parameters:
number - the expected number
Throws:
VerifyFailedException - if verification fails

verifyNumberPreparedStatements

public void verifyNumberPreparedStatements(int number,
                                           java.lang.String sql)
Verifies the number of prepared statements with the specified SQL.

Parameters:
number - the expected number
sql - the SQL
Throws:
VerifyFailedException - if verification fails

verifyNumberCallableStatements

public void verifyNumberCallableStatements(int number)
Verifies the number of callable statements.

Parameters:
number - the expected number
Throws:
VerifyFailedException - if verification fails

verifyNumberCallableStatements

public void verifyNumberCallableStatements(int number,
                                           java.lang.String sql)
Verifies the number of callable statements with the specified SQL.

Parameters:
number - the expected number
sql - the SQL
Throws:
VerifyFailedException - if verification fails

verifyStatementClosed

public void verifyStatementClosed(int index)
Verifies that a statement is closed.

Parameters:
index - the index of the statement
Throws:
VerifyFailedException - if verification fails

verifyPreparedStatementClosed

public void verifyPreparedStatementClosed(int index)
Verifies that a prepared statement is closed.

Parameters:
index - the index of the prepared statement
Throws:
VerifyFailedException - if verification fails

verifyPreparedStatementClosed

public void verifyPreparedStatementClosed(java.lang.String sql)
Verifies that a prepared statement is closed.

Parameters:
sql - the SQL statement
Throws:
VerifyFailedException - if verification fails

verifyCallableStatementClosed

public void verifyCallableStatementClosed(int index)
Verifies that a callable statement is closed.

Parameters:
index - the index of the callable statement
Throws:
VerifyFailedException - if verification fails

verifyCallableStatementClosed

public void verifyCallableStatementClosed(java.lang.String sql)
Verifies that a callable statement is closed.

Parameters:
sql - the SQL statement
Throws:
VerifyFailedException - if verification fails

verifyResultSetRow

public void verifyResultSetRow(MockResultSet resultSet,
                               int number,
                               java.util.List rowData)
Verifies that a row of a ResultSet is equal to the entries in the specified List. Uses MockResultSet.isRowEqual(int, java.util.List). You can verify the data of returned ResultSet objects if the tested JDBC code makes updates.

Parameters:
resultSet - the ResultSet
number - the number of the row
rowData - the row data
Throws:
VerifyFailedException - if verification fails

verifyResultSetRow

public void verifyResultSetRow(MockResultSet resultSet,
                               int number,
                               java.lang.Object[] rowData)
Verifies that a row of a ResultSet is equal to the entries in the specified array. Uses MockResultSet.isRowEqual(int, java.util.List). You can verify the data of returned ResultSet objects if the tested JDBC code makes updates.

Parameters:
resultSet - the ResultSet
number - the number of the row
rowData - the row data
Throws:
VerifyFailedException - if verification fails

verifyResultSetRow

public void verifyResultSetRow(java.lang.String id,
                               int number,
                               java.util.List rowData)
Verifies that a row of a ResultSet is equal to the entries in the specified List. Uses MockResultSet.isRowEqual(int, java.util.List). You can verify the data of returned ResultSet objects if the tested JDBC code makes updates.

Parameters:
id - the id of the ResultSet
number - the number of the row
rowData - the row data
Throws:
VerifyFailedException - if verification fails

verifyResultSetRow

public void verifyResultSetRow(java.lang.String id,
                               int number,
                               java.lang.Object[] rowData)
Verifies that a row of a ResultSet is equal to the entries in the specified array. Uses MockResultSet.isRowEqual(int, java.util.List). You can verify the data of returned ResultSet objects if the tested JDBC code makes updates.

Parameters:
id - the id of the ResultSet
number - the number of the row
rowData - the row data
Throws:
VerifyFailedException - if verification fails

verifyResultSetColumn

public void verifyResultSetColumn(MockResultSet resultSet,
                                  int number,
                                  java.util.List columnData)
Verifies that a column of a ResultSet is equal to the entries in the specified List. Uses MockResultSet.isColumnEqual(int, List). You can verify the data of returned ResultSet objects if the tested JDBC code makes updates.

Parameters:
resultSet - the ResultSet
number - the number of the column
columnData - the column data
Throws:
VerifyFailedException - if verification fails

verifyResultSetColumn

public void verifyResultSetColumn(MockResultSet resultSet,
                                  int number,
                                  java.lang.Object[] columnData)
Verifies that a column of a ResultSet is equal to the entries in the specified array. Uses MockResultSet.isColumnEqual(int, List). You can verify the data of returned ResultSet objects if the tested JDBC code makes updates.

Parameters:
resultSet - the ResultSet
number - the number of the column
columnData - the column data
Throws:
VerifyFailedException - if verification fails

verifyResultSetColumn

public void verifyResultSetColumn(java.lang.String id,
                                  int number,
                                  java.util.List columnData)
Verifies that a column of a ResultSet is equal to the entries in the specified List. Uses MockResultSet.isColumnEqual(int, List). You can verify the data of returned ResultSet objects if the tested JDBC code makes updates.

Parameters:
id - the id of the ResultSet
number - the number of the column
columnData - the column data
Throws:
VerifyFailedException - if verification fails

verifyResultSetColumn

public void verifyResultSetColumn(java.lang.String id,
                                  int number,
                                  java.lang.Object[] columnData)
Verifies that a column of a ResultSet is equal to the entries in the specified array. Uses MockResultSet.isColumnEqual(int, List). You can verify the data of returned ResultSet objects if the tested JDBC code makes updates.

Parameters:
id - the id of the ResultSet
number - the number of the column
columnData - the column data
Throws:
VerifyFailedException - if verification fails

verifyResultSetColumn

public void verifyResultSetColumn(MockResultSet resultSet,
                                  java.lang.String name,
                                  java.util.List columnData)
Verifies that a column of a ResultSet is equal to the entries in the specified List. Uses MockResultSet.isColumnEqual(String, List). You can verify the data of returned ResultSet objects if the tested JDBC code makes updates.

Parameters:
resultSet - the ResultSet
name - the name of the column
columnData - the column data
Throws:
VerifyFailedException - if verification fails

verifyResultSetColumn

public void verifyResultSetColumn(MockResultSet resultSet,
                                  java.lang.String name,
                                  java.lang.Object[] columnData)
Verifies that a column of a ResultSet is equal to the entries in the specified array. Uses MockResultSet.isColumnEqual(String, List). You can verify the data of returned ResultSet objects if the tested JDBC code makes updates.

Parameters:
resultSet - the ResultSet
name - the name of the column
columnData - the column data
Throws:
VerifyFailedException - if verification fails

verifyResultSetColumn

public void verifyResultSetColumn(java.lang.String id,
                                  java.lang.String name,
                                  java.util.List columnData)
Verifies that a column of a ResultSet is equal to the entries in the specified List. Uses MockResultSet.isColumnEqual(String, List). You can verify the data of returned ResultSet objects if the tested JDBC code makes updates.

Parameters:
id - the id of the ResultSet
name - the name of the column
columnData - the column data
Throws:
VerifyFailedException - if verification fails

verifyResultSetColumn

public void verifyResultSetColumn(java.lang.String id,
                                  java.lang.String name,
                                  java.lang.Object[] columnData)
Verifies that a column of a ResultSet is equal to the entries in the specified array. Uses MockResultSet.isColumnEqual(String, List). You can verify the data of returned ResultSet objects if the tested JDBC code makes updates.

Parameters:
id - the id of the ResultSet
name - the name of the column
columnData - the column data
Throws:
VerifyFailedException - if verification fails

verifyResultSetEquals

public void verifyResultSetEquals(MockResultSet source,
                                  MockResultSet target)
Verifies that a ResultSet is equal to another one. Compares all the rows with MockResultSet.isEqual(com.mockrunner.mock.jdbc.MockResultSet).

Parameters:
source - the source ResultSet
target - the target ResultSet
Throws:
VerifyFailedException - if verification fails

verifyResultSetEquals

public void verifyResultSetEquals(java.lang.String id,
                                  MockResultSet target)
Verifies that a ResultSet is equal to another one. Compares all the rows with ParameterUtil.compareParameter(java.lang.Object, java.lang.Object).

Parameters:
id - the id of the source ResultSet
target - the target ResultSet
Throws:
VerifyFailedException - if verification fails

verifyPreparedStatementPresent

public void verifyPreparedStatementPresent(java.lang.String sql)
Verifies that a PreparedStatement with the specified SQL statement is present.

Parameters:
sql - the SQL statement
Throws:
VerifyFailedException - if verification fails

verifyPreparedStatementNotPresent

public void verifyPreparedStatementNotPresent(java.lang.String sql)
Verifies that a PreparedStatement with the specified SQL statement is not present.

Parameters:
sql - the SQL statement
Throws:
VerifyFailedException - if verification fails

verifyCallableStatementPresent

public void verifyCallableStatementPresent(java.lang.String sql)
Verifies that a CallableStatement with the specified SQL statement is present.

Parameters:
sql - the SQL statement
Throws:
VerifyFailedException - if verification fails

verifyCallableStatementNotPresent

public void verifyCallableStatementNotPresent(java.lang.String sql)
Verifies that a CallableStatement with the specified SQL statement is not present.

Parameters:
sql - the SQL statement
Throws:
VerifyFailedException - if verification fails

verifyPreparedStatementParameterPresent

public void verifyPreparedStatementParameterPresent(java.sql.PreparedStatement statement,
                                                    int indexOfParameter)
Verifies that a parameter was added to a PreparedStatement with the specified index.

Parameters:
statement - the PreparedStatement
indexOfParameter - the index used to set the object
Throws:
VerifyFailedException - if verification fails

verifyPreparedStatementParameterPresent

public void verifyPreparedStatementParameterPresent(java.lang.String sql,
                                                    int indexOfParameter)
Verifies that a parameter was added to a PreparedStatement with the specified index. Uses the first PreparedStatement with the specified SQL.

Parameters:
sql - the SQL statement of the PreparedStatement
indexOfParameter - the index used to set the object
Throws:
VerifyFailedException - if verification fails

verifyPreparedStatementParameterPresent

public void verifyPreparedStatementParameterPresent(int indexOfStatement,
                                                    int indexOfParameter)
Verifies that a parameter was added to a PreparedStatement with the specified index.

Parameters:
indexOfStatement - the index of the statement
indexOfParameter - the index used to set the object
Throws:
VerifyFailedException - if verification fails

verifyPreparedStatementParameterNotPresent

public void verifyPreparedStatementParameterNotPresent(java.sql.PreparedStatement statement,
                                                       int indexOfParameter)
Verifies that a parameter with the specified index is not present.

Parameters:
statement - the PreparedStatement
indexOfParameter - the index used to set the object
Throws:
VerifyFailedException - if verification fails

verifyPreparedStatementParameterNotPresent

public void verifyPreparedStatementParameterNotPresent(java.lang.String sql,
                                                       int indexOfParameter)
Verifies that a parameter with the specified index is not present. Uses the first PreparedStatement with the specified SQL.

Parameters:
sql - the SQL statement of the PreparedStatement
indexOfParameter - the index used to set the object
Throws:
VerifyFailedException - if verification fails

verifyPreparedStatementParameterNotPresent

public void verifyPreparedStatementParameterNotPresent(int indexOfStatement,
                                                       int indexOfParameter)
Verifies that a parameter with the specified index is not present.

Parameters:
indexOfStatement - the index of the statement
indexOfParameter - the index used to set the object
Throws:
VerifyFailedException - if verification fails

verifyCallableStatementParameterPresent

public void verifyCallableStatementParameterPresent(java.sql.CallableStatement statement,
                                                    int indexOfParameter)
Verifies that a parameter was added to a CallableStatement with the specified index.

Parameters:
statement - the CallableStatement
indexOfParameter - the index used to set the object
Throws:
VerifyFailedException - if verification fails

verifyCallableStatementParameterPresent

public void verifyCallableStatementParameterPresent(java.lang.String sql,
                                                    int indexOfParameter)
Verifies that a parameter was added to a CallableStatement with the specified index. Uses the first CallableStatement with the specified SQL.

Parameters:
sql - the SQL statement of the CallableStatement
indexOfParameter - the index used to set the object
Throws:
VerifyFailedException - if verification fails

verifyCallableStatementParameterPresent

public void verifyCallableStatementParameterPresent(int indexOfStatement,
                                                    int indexOfParameter)
Verifies that a parameter was added to a CallableStatement with the specified index.

Parameters:
indexOfStatement - the index of the statement
indexOfParameter - the index used to set the object
Throws:
VerifyFailedException - if verification fails

verifyCallableStatementParameterNotPresent

public void verifyCallableStatementParameterNotPresent(java.sql.CallableStatement statement,
                                                       int indexOfParameter)
Verifies that a parameter with the specified index is not present.

Parameters:
statement - the CallableStatement
indexOfParameter - the index used to set the object
Throws:
VerifyFailedException - if verification fails

verifyCallableStatementParameterNotPresent

public void verifyCallableStatementParameterNotPresent(java.lang.String sql,
                                                       int indexOfParameter)
Verifies that a parameter with the specified index is not present. Uses the first CallableStatement with the specified SQL.

Parameters:
sql - the SQL statement of the CallableStatement
indexOfParameter - the index used to set the object
Throws:
VerifyFailedException - if verification fails

verifyCallableStatementParameterNotPresent

public void verifyCallableStatementParameterNotPresent(int indexOfStatement,
                                                       int indexOfParameter)
Verifies that a parameter with the specified index is not present.

Parameters:
indexOfStatement - the index of the statement
indexOfParameter - the index used to set the object
Throws:
VerifyFailedException - if verification fails

verifyCallableStatementParameterPresent

public void verifyCallableStatementParameterPresent(java.sql.CallableStatement statement,
                                                    java.lang.String nameOfParameter)
Verifies that a parameter was added to a CallableStatement with the specified index.

Parameters:
statement - the CallableStatement
nameOfParameter - the name of the parameter
Throws:
VerifyFailedException - if verification fails

verifyCallableStatementParameterPresent

public void verifyCallableStatementParameterPresent(java.lang.String sql,
                                                    java.lang.String nameOfParameter)
Verifies that a parameter was added to a CallableStatement with the specified index. Uses the first CallableStatement with the specified SQL.

Parameters:
sql - the SQL statement of the CallableStatement
nameOfParameter - the name of the parameter
Throws:
VerifyFailedException - if verification fails

verifyCallableStatementParameterPresent

public void verifyCallableStatementParameterPresent(int indexOfStatement,
                                                    java.lang.String nameOfParameter)
Verifies that a parameter was added to a CallableStatement with the specified index.

Parameters:
indexOfStatement - the index of the statement
nameOfParameter - the name of the parameter
Throws:
VerifyFailedException - if verification fails

verifyCallableStatementParameterNotPresent

public void verifyCallableStatementParameterNotPresent(java.sql.CallableStatement statement,
                                                       java.lang.String nameOfParameter)
Verifies that a parameter with the specified index is not present.

Parameters:
statement - the CallableStatement
nameOfParameter - the name of the parameter
Throws:
VerifyFailedException - if verification fails

verifyCallableStatementParameterNotPresent

public void verifyCallableStatementParameterNotPresent(java.lang.String sql,
                                                       java.lang.String nameOfParameter)
Verifies that a parameter with the specified index is not present. Uses the first CallableStatement with the specified SQL.

Parameters:
sql - the SQL statement of the CallableStatement
nameOfParameter - the name of the parameter
Throws:
VerifyFailedException - if verification fails

verifyCallableStatementParameterNotPresent

public void verifyCallableStatementParameterNotPresent(int indexOfStatement,
                                                       java.lang.String nameOfParameter)
Verifies that a parameter with the specified index is not present.

Parameters:
indexOfStatement - the index of the statement
nameOfParameter - the name of the parameter
Throws:
VerifyFailedException - if verification fails

verifyPreparedStatementParameter

public void verifyPreparedStatementParameter(java.sql.PreparedStatement statement,
                                             int indexOfParameter,
                                             java.lang.Object object)
Verifies that a parameter from the specified PreparedStatement is equal to the specified object. Please use the corresponding wrapper type for primitive data types.

Parameters:
statement - the PreparedStatement
indexOfParameter - the index used to set the object
object - the expected object
Throws:
VerifyFailedException - if verification fails

verifyPreparedStatementParameter

public void verifyPreparedStatementParameter(java.lang.String sql,
                                             int indexOfParameter,
                                             java.lang.Object object)
Verifies that a parameter from the PreparedStatement with the specified SQL statement is equal to the specified object. Uses the first PreparedStatement with the specified SQL. Please use the corresponding wrapper type for primitive data types.

Parameters:
sql - the SQL statement of the PreparedStatement
indexOfParameter - the index used to set the object
object - the expected object
Throws:
VerifyFailedException - if verification fails

verifyPreparedStatementParameter

public void verifyPreparedStatementParameter(int indexOfStatement,
                                             int indexOfParameter,
                                             java.lang.Object object)
Verifies that a parameter from the PreparedStatement with the specified SQL statement is equal to the specified object. Please use the corresponding wrapper type for primitive data types.

Parameters:
indexOfStatement - the index of the statement
indexOfParameter - the index used to set the object
object - the expected object
Throws:
VerifyFailedException - if verification fails

verifyCallableStatementParameter

public void verifyCallableStatementParameter(java.sql.CallableStatement statement,
                                             int indexOfParameter,
                                             java.lang.Object object)
Verifies that a parameter from the specified CallableStatement is equal to the specified object. Please use the corresponding wrapper type for primitive data types.

Parameters:
statement - the CallableStatement
indexOfParameter - the index used to set the object
object - the expected object
Throws:
VerifyFailedException - if verification fails

verifyCallableStatementParameter

public void verifyCallableStatementParameter(java.lang.String sql,
                                             int indexOfParameter,
                                             java.lang.Object object)
Verifies that a parameter from the CallableStatement with the specified SQL statement is equal to the specified object. Uses the first CallableStatement with the specified SQL. Please use the corresponding wrapper type for primitive data types.

Parameters:
sql - the SQL statement of the CallableStatement
indexOfParameter - the index used to set the object
object - the expected object
Throws:
VerifyFailedException - if verification fails

verifyCallableStatementParameter

public void verifyCallableStatementParameter(int indexOfStatement,
                                             int indexOfParameter,
                                             java.lang.Object object)
Verifies that a parameter from the CallableStatement with the specified SQL statement is equal to the specified object. Please use the corresponding wrapper type for primitive data types.

Parameters:
indexOfStatement - the index of the statement
indexOfParameter - the index used to set the object
object - the expected object
Throws:
VerifyFailedException - if verification fails

verifyCallableStatementParameter

public void verifyCallableStatementParameter(java.sql.CallableStatement statement,
                                             java.lang.String nameOfParameter,
                                             java.lang.Object object)
Verifies that a parameter from the specified CallableStatement is equal to the specified object. Please use the corresponding wrapper type for primitive data types.

Parameters:
statement - the CallableStatement
nameOfParameter - the name of the parameter
object - the expected object
Throws:
VerifyFailedException - if verification fails

verifyCallableStatementParameter

public void verifyCallableStatementParameter(java.lang.String sql,
                                             java.lang.String nameOfParameter,
                                             java.lang.Object object)
Verifies that a parameter from the CallableStatement with the specified SQL statement is equal to the specified object. Uses the first CallableStatement with the specified SQL. Please use the corresponding wrapper type for primitive data types.

Parameters:
sql - the SQL statement of the CallableStatement
nameOfParameter - the name of the parameter
object - the expected object
Throws:
VerifyFailedException - if verification fails

verifyCallableStatementParameter

public void verifyCallableStatementParameter(int indexOfStatement,
                                             java.lang.String nameOfParameter,
                                             java.lang.Object object)
Verifies that a parameter from the CallableStatement with the specified SQL statement is equal to the specified object. Please use the corresponding wrapper type for primitive data types.

Parameters:
indexOfStatement - the index of the statement
nameOfParameter - the name of the parameter
object - the expected object
Throws:
VerifyFailedException - if verification fails

verifyCallableStatementOutParameterRegistered

public void verifyCallableStatementOutParameterRegistered(java.sql.CallableStatement statement,
                                                          int indexOfParameter)
Verifies that an out parameter was registered on the specified CallableStatement.

Parameters:
statement - the CallableStatement
indexOfParameter - the index of the parameter
Throws:
VerifyFailedException - if verification fails

verifyCallableStatementOutParameterRegistered

public void verifyCallableStatementOutParameterRegistered(java.lang.String sql,
                                                          int indexOfParameter)
Verifies that an out parameter was registered on the CallableStatement with the specified SQL.

Parameters:
sql - the SQL statement
indexOfParameter - the index of the parameter
Throws:
VerifyFailedException - if verification fails

verifyCallableStatementOutParameterRegistered

public void verifyCallableStatementOutParameterRegistered(int indexOfStatement,
                                                          int indexOfParameter)
Verifies that an out parameter was registered on the CallableStatement with the specified index.

Parameters:
indexOfStatement - the index of the CallableStatement
indexOfParameter - the index of the parameter
Throws:
VerifyFailedException - if verification fails

verifyCallableStatementOutParameterRegistered

public void verifyCallableStatementOutParameterRegistered(java.sql.CallableStatement statement,
                                                          java.lang.String nameOfParameter)
Verifies that an out parameter was registered on the specified CallableStatement.

Parameters:
statement - the CallableStatement
nameOfParameter - the name of the parameter
Throws:
VerifyFailedException - if verification fails

verifyCallableStatementOutParameterRegistered

public void verifyCallableStatementOutParameterRegistered(java.lang.String sql,
                                                          java.lang.String nameOfParameter)
Verifies that an out parameter was registered on the CallableStatement with the specified SQL.

Parameters:
sql - the SQL statement
nameOfParameter - the name of the parameter
Throws:
VerifyFailedException - if verification fails

verifyCallableStatementOutParameterRegistered

public void verifyCallableStatementOutParameterRegistered(int indexOfStatement,
                                                          java.lang.String nameOfParameter)
Verifies that an out parameter was registered on the CallableStatement with the specified index.

Parameters:
indexOfStatement - the index of the CallableStatement
nameOfParameter - the name of the parameter
Throws:
VerifyFailedException - if verification fails

verifySavepointPresent

public void verifySavepointPresent(int index)
Verifies that a Savepoint with the specified index is present. The index is the number of the created Savepoint starting with 0 for the first Savepoint.

Parameters:
index - the index of the Savepoint

verifySavepointPresent

public void verifySavepointPresent(java.lang.String name)
Verifies that a Savepoint with the specified name is present.

Parameters:
name - the name of the Savepoint

verifySavepointReleased

public void verifySavepointReleased(int index)
Verifies that the Savepoint with the specified index is released. The index is the number of the created Savepoint starting with 0 for the first Savepoint.

Parameters:
index - the index of the Savepoint

verifySavepointReleased

public void verifySavepointReleased(java.lang.String name)
Verifies that the Savepoint with the specified name is released.

Parameters:
name - the name of the Savepoint

verifySavepointNotReleased

public void verifySavepointNotReleased(int index)
Verifies that the Savepoint with the specified index is not released. The index is the number of the created Savepoint starting with 0 for the first Savepoint.

Parameters:
index - the index of the Savepoint

verifySavepointNotReleased

public void verifySavepointNotReleased(java.lang.String name)
Verifies that the Savepoint with the specified name is not released.

Parameters:
name - the name of the Savepoint

verifySavepointRolledBack

public void verifySavepointRolledBack(int index)
Verifies that the Savepoint with the specified index is rolled back. The index is the number of the created Savepoint starting with 0 for the first Savepoint.

Parameters:
index - the index of the Savepoint

verifySavepointRolledBack

public void verifySavepointRolledBack(java.lang.String name)
Verifies that the Savepoint with the specified name is rolled back.

Parameters:
name - the name of the Savepoint

verifySavepointNotRolledBack

public void verifySavepointNotRolledBack(int index)
Verifies that the Savepoint with the specified index is not rolled back. The index is the number of the created Savepoint starting with 0 for the first Savepoint.

Parameters:
index - the index of the Savepoint

verifySavepointNotRolledBack

public void verifySavepointNotRolledBack(java.lang.String name)
Verifies that the Savepoint with the specified name is not rolled back.

Parameters:
name - the name of the Savepoint

verifySavepointRollbacked

public void verifySavepointRollbacked(int index)
Deprecated. use verifySavepointRolledBack(int)


verifySavepointRollbacked

public void verifySavepointRollbacked(java.lang.String name)
Deprecated. use verifySavepointRolledBack(String)


verifySavepointNotRollbacked

public void verifySavepointNotRollbacked(int index)
Deprecated. use verifySavepointNotRolledBack(int)


verifySavepointNotRollbacked

public void verifySavepointNotRollbacked(java.lang.String name)
Deprecated. use verifySavepointNotRolledBack(String)