|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.mockrunner.jdbc.JDBCTestModule
public class JDBCTestModule
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 |
---|
public JDBCTestModule(JDBCMockObjectFactory mockFactory)
Method Detail |
---|
public void setCaseSensitive(boolean caseSensitive)
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.
caseSensitive
- enable or disable case sensitivitypublic void setExactMatch(boolean exactMatch)
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.
exactMatch
- enable or disable exact matchingpublic void setUseRegularExpressions(boolean useRegularExpressions)
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.
useRegularExpressions
- should regular expressions be usedpublic StatementResultSetHandler getStatementResultSetHandler()
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.
StatementResultSetHandler
public PreparedStatementResultSetHandler getPreparedStatementResultSetHandler()
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.
PreparedStatementResultSetHandler
public CallableStatementResultSetHandler getCallableStatementResultSetHandler()
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.
CallableStatementResultSetHandler
public MockStatement getStatement(int index)
MockStatement
by its index.
index
- the index of the Statement
Statement
or null
, if there is no such
Statement
public java.util.List getStatements()
MockStatement
objects.
List
of Statement
objectspublic java.util.List getExecutedSQLStatements()
List
of all SQL statements that were executed
by calling an execute
method of a MockStatement
,
MockPreparedStatement
or
MockCallableStatement
.
List
of SQL statementspublic java.util.Map getExecutedSQLStatementParameter()
getExecutedSQLStatementParameterMap()
public java.util.Map getExecutedSQLStatementParameterMap()
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.
Map
of parameterspublic ParameterSets getExecutedSQLStatementParameterSets(java.lang.String sql)
ParameterSets
object for the specified SQL statement.
If more than one ParameterSets
object is found, the first one
will be returned.
sql
- the the SQL statement
ParameterSets
object or null
if no
matching object is foundpublic MockResultSet getReturnedResultSet(java.lang.String id)
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)
.
ResultSet
with the specified idpublic java.util.List getReturnedResultSets(java.lang.String id)
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.
List
of ResultSet
objectspublic java.util.List getReturnedResultSets()
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.
List
of ResultSet
or ResultSet[]
objectspublic MockPreparedStatement getPreparedStatement(int index)
MockPreparedStatement
that was
created using a MockConnection
by its index.
index
- the index of the PreparedStatement
PreparedStatement
or null
, if there is no such
PreparedStatement
public MockPreparedStatement getPreparedStatement(java.lang.String sql)
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)
.
sql
- the SQL statement used to create the PreparedStatement
PreparedStatement
or null
, if there is no macthpublic java.util.List getPreparedStatements()
MockPreparedStatement
objects.
List
of PreparedStatement
objectspublic java.util.List getPreparedStatements(java.lang.String sql)
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)
.
sql
- the SQL statement used to create the PreparedStatement
List
of PreparedStatement
objectspublic MockCallableStatement getCallableStatement(int index)
MockCallableStatement
that was
created using a MockConnection
by its index.
index
- the index of the CallableStatement
CallableStatement
or null
, if there is no such
CallableStatement
public MockCallableStatement getCallableStatement(java.lang.String sql)
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)
.
sql
- the SQL statement used to create the CallableStatement
CallableStatement
or null
, if there is no macthpublic java.util.List getCallableStatements()
MockCallableStatement
objects.
List
of CallableStatement
objectspublic java.util.List getCallableStatements(java.lang.String sql)
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)
.
sql
- the SQL statement used to create the CallableStatement
List
of CallableStatement
objectspublic java.lang.Object getPreparedStatementParameter(java.sql.PreparedStatement statement, int indexOfParameter)
PreparedStatement
using its set
methods. Simple data types are returned as
the corresponsing wrapper type.
statement
- the PreparedStatement
indexOfParameter
- the index used to set the parameter
public java.lang.Object getPreparedStatementParameter(java.lang.String sql, int indexOfParameter)
PreparedStatement
using its set
methods. Uses the first PreparedStatement
with the specified SQL statement. Simple data types are returned as
the corresponsing wrapper type.
sql
- the SQL statementindexOfParameter
- the index used to set the object
public java.lang.Object getPreparedStatementParameter(int indexOfStatement, int indexOfParameter)
PreparedStatement
using its set
methods. Simple data types are returned as
the corresponsing wrapper type.
indexOfStatement
- the index of the statementindexOfParameter
- the index used to set the object
public java.lang.Object getCallableStatementParameter(java.sql.CallableStatement statement, int indexOfParameter)
CallableStatement
using its set
methods. Simple data types are returned as
the corresponsing wrapper type.
statement
- the CallableStatement
indexOfParameter
- the index used to set the parameter
public java.lang.Object getCallableStatementParameter(java.lang.String sql, int indexOfParameter)
CallableStatement
using its set
methods. Uses the first CallableStatement
with the specified SQL statement. Simple data types are returned as
the corresponsing wrapper type.
sql
- the SQL statementindexOfParameter
- the index used to set the object
public java.lang.Object getCallableStatementParameter(int indexOfStatement, int indexOfParameter)
CallableStatement
using its set
methods. Simple data types are returned as
the corresponsing wrapper type.
indexOfStatement
- the index of the statementindexOfParameter
- the index used to set the object
public java.lang.Object getCallableStatementParameter(java.sql.CallableStatement statement, java.lang.String nameOfParameter)
CallableStatement
using its set
methods.
statement
- the CallableStatement
nameOfParameter
- the name of the parameter
public java.lang.Object getCallableStatementParameter(java.lang.String sql, java.lang.String nameOfParameter)
CallableStatement
using its set
methods. Uses the first CallableStatement
with the specified SQL statement.
sql
- the SQL statementnameOfParameter
- the name of the parameter
public java.lang.Object getCallableStatementParameter(int indexOfStatement, java.lang.String nameOfParameter)
CallableStatement
using its set
methods.
indexOfStatement
- the index of the statementnameOfParameter
- the name of the parameter
public java.util.List getSavepoints()
Savepoint
objects.
List
of MockSavepoint
objectspublic MockSavepoint getSavepoint(int index)
Savepoint
with the specified index.
The index is the number of the created Savepoint
starting with 0 for the first Savepoint
.
index
- the index
MockSavepoint
public MockSavepoint getSavepoint(java.lang.String name)
Savepoint
with the specified name.
Unnamed Savepoint
objects get the name "".
name
- the name
MockSavepoint
public void verifySQLStatementExecuted(java.lang.String sql)
sql
- the expected SQL string
VerifyFailedException
- if verification failspublic void verifySQLStatementNotExecuted(java.lang.String sql)
sql
- the SQL string
VerifyFailedException
- if verification failspublic void verifySQLStatementParameterNumber(java.lang.String sql, int indexOfParameterSet, int number)
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.
sql
- the SQL stringindexOfParameterSet
- the number of the parameter setnumber
- the expected number of parameters
VerifyFailedException
- if verification failspublic void verifySQLStatementParameter(java.lang.String sql, int indexOfParameterSet, java.util.Map parameterMap)
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.
sql
- the SQL stringindexOfParameterSet
- the number of the parameter setparameterMap
- the map of expected parameters
VerifyFailedException
- if verification failspublic void verifySQLStatementParameter(java.lang.String sql, int indexOfParameterSet, int indexOfParameter, java.lang.Object expectedParameter)
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.
sql
- the SQL stringindexOfParameterSet
- the number of the parameter setindexOfParameter
- the index of the parameterexpectedParameter
- the expected parameter
VerifyFailedException
- if verification failspublic void verifySQLStatementParameter(java.lang.String sql, int indexOfParameterSet, java.lang.String nameOfParameter, java.lang.Object expectedParameter)
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.
sql
- the SQL stringindexOfParameterSet
- the number of the parameter setnameOfParameter
- the name of the parameterexpectedParameter
- the expected parameter
VerifyFailedException
- if verification failspublic void verifyConnectionClosed()
VerifyFailedException
- if verification failspublic void verifyAllStatementsClosed()
VerifyFailedException
- if verification failspublic void verifyResultSetClosed(java.lang.String id)
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.
VerifyFailedException
- if verification failspublic void verifyResultSetRowInserted(MockResultSet resultSet, int number)
ResultSet
was
inserted.
resultSet
- the ResultSet
number
- the number of the row
VerifyFailedException
- if verification failspublic void verifyResultSetRowInserted(java.lang.String id, int number)
ResultSet
was
inserted.
id
- the id of the ResultSet
number
- the number of the row
VerifyFailedException
- if verification failspublic void verifyResultSetRowNotInserted(MockResultSet resultSet, int number)
ResultSet
was
not inserted.
resultSet
- the ResultSet
number
- the number of the row
VerifyFailedException
- if verification failspublic void verifyResultSetRowNotInserted(java.lang.String id, int number)
ResultSet
was
not inserted.
id
- the id of the ResultSet
number
- the number of the row
VerifyFailedException
- if verification failspublic void verifyResultSetRowUpdated(MockResultSet resultSet, int number)
ResultSet
was
updated.
resultSet
- the ResultSet
number
- the number of the row
VerifyFailedException
- if verification failspublic void verifyResultSetRowUpdated(java.lang.String id, int number)
ResultSet
was
updated.
id
- the id of the ResultSet
number
- the number of the row
VerifyFailedException
- if verification failspublic void verifyResultSetRowNotUpdated(MockResultSet resultSet, int number)
ResultSet
was
not updated.
resultSet
- the ResultSet
number
- the number of the row
VerifyFailedException
- if verification failspublic void verifyResultSetRowNotUpdated(java.lang.String id, int number)
ResultSet
was
not updated.
id
- the id of the ResultSet
number
- the number of the row
VerifyFailedException
- if verification failspublic void verifyResultSetRowDeleted(MockResultSet resultSet, int number)
ResultSet
was
deleted.
resultSet
- the ResultSet
number
- the number of the row
VerifyFailedException
- if verification failspublic void verifyResultSetRowDeleted(java.lang.String id, int number)
ResultSet
was
deleted.
id
- the id of the ResultSet
number
- the number of the row
VerifyFailedException
- if verification failspublic void verifyResultSetRowNotDeleted(MockResultSet resultSet, int number)
ResultSet
was
not deleted.
resultSet
- the ResultSet
number
- the number of the row
VerifyFailedException
- if verification failspublic void verifyResultSetRowNotDeleted(java.lang.String id, int number)
ResultSet
was
not deleted.
id
- the id of the ResultSet
number
- the number of the row
VerifyFailedException
- if verification failspublic void verifyAllResultSetsClosed()
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.
VerifyFailedException
- if verification failspublic void verifyCommitted()
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.
VerifyFailedException
- if verification failspublic void verifyNotCommitted()
Connection
is not in
autocommit mode. Automatic commits are not recognized.
VerifyFailedException
- if verification failspublic void verifyRolledBack()
rollback
method of Connection
was at least called once.
Makes only sense, if the Connection
is not in
autocommit mode.
VerifyFailedException
- if verification failspublic void verifyNotRolledBack()
Connection
is not in
autocommit mode.
VerifyFailedException
- if verification failspublic void verifyNumberCommits(int number)
commit
calls.
Makes only sense, if the Connection
is not in
autocommit mode.
number
- the expected number of commits
VerifyFailedException
- if verification failspublic void verifyNumberRollbacks(int number)
rollback
calls.
Makes only sense, if the Connection
is not in
autocommit mode.
number
- the expected number of rollbacks
VerifyFailedException
- if verification failspublic void verifyNumberStatements(int number)
number
- the expected number
VerifyFailedException
- if verification failspublic void verifyNumberPreparedStatements(int number)
number
- the expected number
VerifyFailedException
- if verification failspublic void verifyNumberPreparedStatements(int number, java.lang.String sql)
number
- the expected numbersql
- the SQL
VerifyFailedException
- if verification failspublic void verifyNumberCallableStatements(int number)
number
- the expected number
VerifyFailedException
- if verification failspublic void verifyNumberCallableStatements(int number, java.lang.String sql)
number
- the expected numbersql
- the SQL
VerifyFailedException
- if verification failspublic void verifyStatementClosed(int index)
index
- the index of the statement
VerifyFailedException
- if verification failspublic void verifyPreparedStatementClosed(int index)
index
- the index of the prepared statement
VerifyFailedException
- if verification failspublic void verifyPreparedStatementClosed(java.lang.String sql)
sql
- the SQL statement
VerifyFailedException
- if verification failspublic void verifyCallableStatementClosed(int index)
index
- the index of the callable statement
VerifyFailedException
- if verification failspublic void verifyCallableStatementClosed(java.lang.String sql)
sql
- the SQL statement
VerifyFailedException
- if verification failspublic void verifyResultSetRow(MockResultSet resultSet, int number, java.util.List rowData)
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.
resultSet
- the ResultSet
number
- the number of the rowrowData
- the row data
VerifyFailedException
- if verification failspublic void verifyResultSetRow(MockResultSet resultSet, int number, java.lang.Object[] rowData)
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.
resultSet
- the ResultSet
number
- the number of the rowrowData
- the row data
VerifyFailedException
- if verification failspublic void verifyResultSetRow(java.lang.String id, int number, java.util.List rowData)
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.
id
- the id of the ResultSet
number
- the number of the rowrowData
- the row data
VerifyFailedException
- if verification failspublic void verifyResultSetRow(java.lang.String id, int number, java.lang.Object[] rowData)
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.
id
- the id of the ResultSet
number
- the number of the rowrowData
- the row data
VerifyFailedException
- if verification failspublic void verifyResultSetColumn(MockResultSet resultSet, int number, java.util.List columnData)
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.
resultSet
- the ResultSet
number
- the number of the columncolumnData
- the column data
VerifyFailedException
- if verification failspublic void verifyResultSetColumn(MockResultSet resultSet, int number, java.lang.Object[] columnData)
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.
resultSet
- the ResultSet
number
- the number of the columncolumnData
- the column data
VerifyFailedException
- if verification failspublic void verifyResultSetColumn(java.lang.String id, int number, java.util.List columnData)
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.
id
- the id of the ResultSet
number
- the number of the columncolumnData
- the column data
VerifyFailedException
- if verification failspublic void verifyResultSetColumn(java.lang.String id, int number, java.lang.Object[] columnData)
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.
id
- the id of the ResultSet
number
- the number of the columncolumnData
- the column data
VerifyFailedException
- if verification failspublic void verifyResultSetColumn(MockResultSet resultSet, java.lang.String name, java.util.List columnData)
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.
resultSet
- the ResultSet
name
- the name of the columncolumnData
- the column data
VerifyFailedException
- if verification failspublic void verifyResultSetColumn(MockResultSet resultSet, java.lang.String name, java.lang.Object[] columnData)
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.
resultSet
- the ResultSet
name
- the name of the columncolumnData
- the column data
VerifyFailedException
- if verification failspublic void verifyResultSetColumn(java.lang.String id, java.lang.String name, java.util.List columnData)
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.
id
- the id of the ResultSet
name
- the name of the columncolumnData
- the column data
VerifyFailedException
- if verification failspublic void verifyResultSetColumn(java.lang.String id, java.lang.String name, java.lang.Object[] columnData)
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.
id
- the id of the ResultSet
name
- the name of the columncolumnData
- the column data
VerifyFailedException
- if verification failspublic void verifyResultSetEquals(MockResultSet source, MockResultSet target)
ResultSet
is equal to another one.
Compares all the rows with MockResultSet.isEqual(com.mockrunner.mock.jdbc.MockResultSet)
.
source
- the source ResultSet
target
- the target ResultSet
VerifyFailedException
- if verification failspublic void verifyResultSetEquals(java.lang.String id, MockResultSet target)
ResultSet
is equal to another one.
Compares all the rows with ParameterUtil.compareParameter(java.lang.Object, java.lang.Object)
.
id
- the id of the source ResultSet
target
- the target ResultSet
VerifyFailedException
- if verification failspublic void verifyPreparedStatementPresent(java.lang.String sql)
PreparedStatement
with the specified
SQL statement is present.
sql
- the SQL statement
VerifyFailedException
- if verification failspublic void verifyPreparedStatementNotPresent(java.lang.String sql)
PreparedStatement
with the specified
SQL statement is not present.
sql
- the SQL statement
VerifyFailedException
- if verification failspublic void verifyCallableStatementPresent(java.lang.String sql)
CallableStatement
with the specified
SQL statement is present.
sql
- the SQL statement
VerifyFailedException
- if verification failspublic void verifyCallableStatementNotPresent(java.lang.String sql)
CallableStatement
with the specified
SQL statement is not present.
sql
- the SQL statement
VerifyFailedException
- if verification failspublic void verifyPreparedStatementParameterPresent(java.sql.PreparedStatement statement, int indexOfParameter)
PreparedStatement
with
the specified index.
statement
- the PreparedStatement
indexOfParameter
- the index used to set the object
VerifyFailedException
- if verification failspublic void verifyPreparedStatementParameterPresent(java.lang.String sql, int indexOfParameter)
PreparedStatement
with
the specified index. Uses the first PreparedStatement
with
the specified SQL.
sql
- the SQL statement of the PreparedStatement
indexOfParameter
- the index used to set the object
VerifyFailedException
- if verification failspublic void verifyPreparedStatementParameterPresent(int indexOfStatement, int indexOfParameter)
PreparedStatement
with
the specified index.
indexOfStatement
- the index of the statementindexOfParameter
- the index used to set the object
VerifyFailedException
- if verification failspublic void verifyPreparedStatementParameterNotPresent(java.sql.PreparedStatement statement, int indexOfParameter)
statement
- the PreparedStatement
indexOfParameter
- the index used to set the object
VerifyFailedException
- if verification failspublic void verifyPreparedStatementParameterNotPresent(java.lang.String sql, int indexOfParameter)
PreparedStatement
with the specified SQL.
sql
- the SQL statement of the PreparedStatement
indexOfParameter
- the index used to set the object
VerifyFailedException
- if verification failspublic void verifyPreparedStatementParameterNotPresent(int indexOfStatement, int indexOfParameter)
indexOfStatement
- the index of the statementindexOfParameter
- the index used to set the object
VerifyFailedException
- if verification failspublic void verifyCallableStatementParameterPresent(java.sql.CallableStatement statement, int indexOfParameter)
CallableStatement
with
the specified index.
statement
- the CallableStatement
indexOfParameter
- the index used to set the object
VerifyFailedException
- if verification failspublic void verifyCallableStatementParameterPresent(java.lang.String sql, int indexOfParameter)
CallableStatement
with
the specified index. Uses the first CallableStatement
with
the specified SQL.
sql
- the SQL statement of the CallableStatement
indexOfParameter
- the index used to set the object
VerifyFailedException
- if verification failspublic void verifyCallableStatementParameterPresent(int indexOfStatement, int indexOfParameter)
CallableStatement
with
the specified index.
indexOfStatement
- the index of the statementindexOfParameter
- the index used to set the object
VerifyFailedException
- if verification failspublic void verifyCallableStatementParameterNotPresent(java.sql.CallableStatement statement, int indexOfParameter)
statement
- the CallableStatement
indexOfParameter
- the index used to set the object
VerifyFailedException
- if verification failspublic void verifyCallableStatementParameterNotPresent(java.lang.String sql, int indexOfParameter)
CallableStatement
with the specified SQL.
sql
- the SQL statement of the CallableStatement
indexOfParameter
- the index used to set the object
VerifyFailedException
- if verification failspublic void verifyCallableStatementParameterNotPresent(int indexOfStatement, int indexOfParameter)
indexOfStatement
- the index of the statementindexOfParameter
- the index used to set the object
VerifyFailedException
- if verification failspublic void verifyCallableStatementParameterPresent(java.sql.CallableStatement statement, java.lang.String nameOfParameter)
CallableStatement
with
the specified index.
statement
- the CallableStatement
nameOfParameter
- the name of the parameter
VerifyFailedException
- if verification failspublic void verifyCallableStatementParameterPresent(java.lang.String sql, java.lang.String nameOfParameter)
CallableStatement
with
the specified index. Uses the first CallableStatement
with
the specified SQL.
sql
- the SQL statement of the CallableStatement
nameOfParameter
- the name of the parameter
VerifyFailedException
- if verification failspublic void verifyCallableStatementParameterPresent(int indexOfStatement, java.lang.String nameOfParameter)
CallableStatement
with
the specified index.
indexOfStatement
- the index of the statementnameOfParameter
- the name of the parameter
VerifyFailedException
- if verification failspublic void verifyCallableStatementParameterNotPresent(java.sql.CallableStatement statement, java.lang.String nameOfParameter)
statement
- the CallableStatement
nameOfParameter
- the name of the parameter
VerifyFailedException
- if verification failspublic void verifyCallableStatementParameterNotPresent(java.lang.String sql, java.lang.String nameOfParameter)
CallableStatement
with the specified SQL.
sql
- the SQL statement of the CallableStatement
nameOfParameter
- the name of the parameter
VerifyFailedException
- if verification failspublic void verifyCallableStatementParameterNotPresent(int indexOfStatement, java.lang.String nameOfParameter)
indexOfStatement
- the index of the statementnameOfParameter
- the name of the parameter
VerifyFailedException
- if verification failspublic void verifyPreparedStatementParameter(java.sql.PreparedStatement statement, int indexOfParameter, java.lang.Object object)
PreparedStatement
is equal
to the specified object. Please use the corresponding wrapper type for
primitive data types.
statement
- the PreparedStatement
indexOfParameter
- the index used to set the objectobject
- the expected object
VerifyFailedException
- if verification failspublic void verifyPreparedStatementParameter(java.lang.String sql, int indexOfParameter, java.lang.Object object)
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.
sql
- the SQL statement of the PreparedStatement
indexOfParameter
- the index used to set the objectobject
- the expected object
VerifyFailedException
- if verification failspublic void verifyPreparedStatementParameter(int indexOfStatement, int indexOfParameter, java.lang.Object object)
PreparedStatement
with the
specified SQL statement is equal to the specified object.
Please use the corresponding wrapper type for primitive data types.
indexOfStatement
- the index of the statementindexOfParameter
- the index used to set the objectobject
- the expected object
VerifyFailedException
- if verification failspublic void verifyCallableStatementParameter(java.sql.CallableStatement statement, int indexOfParameter, java.lang.Object object)
CallableStatement
is equal
to the specified object. Please use the corresponding wrapper type
for primitive data types.
statement
- the CallableStatement
indexOfParameter
- the index used to set the objectobject
- the expected object
VerifyFailedException
- if verification failspublic void verifyCallableStatementParameter(java.lang.String sql, int indexOfParameter, java.lang.Object object)
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.
sql
- the SQL statement of the CallableStatement
indexOfParameter
- the index used to set the objectobject
- the expected object
VerifyFailedException
- if verification failspublic void verifyCallableStatementParameter(int indexOfStatement, int indexOfParameter, java.lang.Object object)
CallableStatement
with the
specified SQL statement is equal to the specified object.
Please use the corresponding wrapper type for primitive data types.
indexOfStatement
- the index of the statementindexOfParameter
- the index used to set the objectobject
- the expected object
VerifyFailedException
- if verification failspublic void verifyCallableStatementParameter(java.sql.CallableStatement statement, java.lang.String nameOfParameter, java.lang.Object object)
CallableStatement
is equal
to the specified object. Please use the corresponding wrapper type
for primitive data types.
statement
- the CallableStatement
nameOfParameter
- the name of the parameterobject
- the expected object
VerifyFailedException
- if verification failspublic void verifyCallableStatementParameter(java.lang.String sql, java.lang.String nameOfParameter, java.lang.Object object)
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.
sql
- the SQL statement of the CallableStatement
nameOfParameter
- the name of the parameterobject
- the expected object
VerifyFailedException
- if verification failspublic void verifyCallableStatementParameter(int indexOfStatement, java.lang.String nameOfParameter, java.lang.Object object)
CallableStatement
with the
specified SQL statement is equal to the specified object.
Please use the corresponding wrapper type for primitive data types.
indexOfStatement
- the index of the statementnameOfParameter
- the name of the parameterobject
- the expected object
VerifyFailedException
- if verification failspublic void verifyCallableStatementOutParameterRegistered(java.sql.CallableStatement statement, int indexOfParameter)
CallableStatement
.
statement
- the CallableStatement
indexOfParameter
- the index of the parameter
VerifyFailedException
- if verification failspublic void verifyCallableStatementOutParameterRegistered(java.lang.String sql, int indexOfParameter)
CallableStatement
with the specified SQL.
sql
- the SQL statementindexOfParameter
- the index of the parameter
VerifyFailedException
- if verification failspublic void verifyCallableStatementOutParameterRegistered(int indexOfStatement, int indexOfParameter)
CallableStatement
with the specified index.
indexOfStatement
- the index of the CallableStatement
indexOfParameter
- the index of the parameter
VerifyFailedException
- if verification failspublic void verifyCallableStatementOutParameterRegistered(java.sql.CallableStatement statement, java.lang.String nameOfParameter)
CallableStatement
.
statement
- the CallableStatement
nameOfParameter
- the name of the parameter
VerifyFailedException
- if verification failspublic void verifyCallableStatementOutParameterRegistered(java.lang.String sql, java.lang.String nameOfParameter)
CallableStatement
with the specified SQL.
sql
- the SQL statementnameOfParameter
- the name of the parameter
VerifyFailedException
- if verification failspublic void verifyCallableStatementOutParameterRegistered(int indexOfStatement, java.lang.String nameOfParameter)
CallableStatement
with the specified index.
indexOfStatement
- the index of the CallableStatement
nameOfParameter
- the name of the parameter
VerifyFailedException
- if verification failspublic void verifySavepointPresent(int index)
Savepoint
with the specified index
is present. The index is the number of the created Savepoint
starting with 0 for the first Savepoint
.
index
- the index of the Savepoint
public void verifySavepointPresent(java.lang.String name)
Savepoint
with the specified name
is present.
name
- the name of the Savepoint
public void verifySavepointReleased(int index)
Savepoint
with the specified index
is released. The index is the number of the created Savepoint
starting with 0 for the first Savepoint
.
index
- the index of the Savepoint
public void verifySavepointReleased(java.lang.String name)
Savepoint
with the specified name
is released.
name
- the name of the Savepoint
public void verifySavepointNotReleased(int index)
Savepoint
with the specified index
is not released. The index is the number of the created Savepoint
starting with 0 for the first Savepoint
.
index
- the index of the Savepoint
public void verifySavepointNotReleased(java.lang.String name)
Savepoint
with the specified name
is not released.
name
- the name of the Savepoint
public void verifySavepointRolledBack(int index)
Savepoint
with the specified index
is rolled back. The index is the number of the created Savepoint
starting with 0 for the first Savepoint
.
index
- the index of the Savepoint
public void verifySavepointRolledBack(java.lang.String name)
Savepoint
with the specified name
is rolled back.
name
- the name of the Savepoint
public void verifySavepointNotRolledBack(int index)
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
.
index
- the index of the Savepoint
public void verifySavepointNotRolledBack(java.lang.String name)
Savepoint
with the specified name
is not rolled back.
name
- the name of the Savepoint
public void verifySavepointRollbacked(int index)
verifySavepointRolledBack(int)
public void verifySavepointRollbacked(java.lang.String name)
verifySavepointRolledBack(String)
public void verifySavepointNotRollbacked(int index)
verifySavepointNotRolledBack(int)
public void verifySavepointNotRollbacked(java.lang.String name)
verifySavepointNotRolledBack(String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |