Java Doc for JDBCTestModule.java in  » Testing » mockrunner-0.4 » com » mockrunner » jdbc » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Testing » mockrunner 0.4 » com.mockrunner.jdbc 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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

JDBCTestModule
public class JDBCTestModule (Code)
Module for JDBC tests.



Constructor Summary
public  JDBCTestModule(JDBCMockObjectFactory mockFactory)
    

Method Summary
public  MockCallableStatementgetCallableStatement(int index)
     Returns a com.mockrunner.mock.jdbc.MockCallableStatement that was created using a com.mockrunner.mock.jdbc.MockConnection by its index.
public  MockCallableStatementgetCallableStatement(String sql)
     Returns a com.mockrunner.mock.jdbc.MockCallableStatement that was created using a com.mockrunner.mock.jdbc.MockConnection by its SQL statement.
public  ObjectgetCallableStatementParameter(CallableStatement statement, int indexOfParameter)
     Returns a parameter that was added to a CallableStatement using its set methods.
public  ObjectgetCallableStatementParameter(String sql, int indexOfParameter)
     Returns a parameter that was added to a CallableStatement using its set methods.
public  ObjectgetCallableStatementParameter(int indexOfStatement, int indexOfParameter)
     Returns an object that was added to a CallableStatement using its set methods.
public  ObjectgetCallableStatementParameter(CallableStatement statement, String nameOfParameter)
     Returns a parameter that was added to a CallableStatement using its set methods.
public  ObjectgetCallableStatementParameter(String sql, String nameOfParameter)
     Returns a parameter that was added to a CallableStatement using its set methods.
public  ObjectgetCallableStatementParameter(int indexOfStatement, String nameOfParameter)
     Returns an object that was added to a CallableStatement using its set methods.
public  CallableStatementResultSetHandlergetCallableStatementResultSetHandler()
     Returns the CallableStatementResultSetHandler .
public  ListgetCallableStatements()
     Returns all com.mockrunner.mock.jdbc.MockCallableStatement objects.
public  ListgetCallableStatements(String sql)
     Returns all com.mockrunner.mock.jdbc.MockCallableStatement objects with the specified SQL statement as a List.
public  MapgetExecutedSQLStatementParameter()
    
public  MapgetExecutedSQLStatementParameterMap()
     Returns a Map of all parameters that were used when executing a com.mockrunner.mock.jdbc.MockPreparedStatement or com.mockrunner.mock.jdbc.MockCallableStatement . The keys are the corresponding SQL statements.
public  ParameterSetsgetExecutedSQLStatementParameterSets(String sql)
     Returns the ParameterSets object for the specified SQL statement.
public  ListgetExecutedSQLStatements()
     Returns a List of all SQL statements that were executed by calling an execute method of a com.mockrunner.mock.jdbc.MockStatement , com.mockrunner.mock.jdbc.MockPreparedStatement or com.mockrunner.mock.jdbc.MockCallableStatement .
public  MockPreparedStatementgetPreparedStatement(int index)
     Returns a com.mockrunner.mock.jdbc.MockPreparedStatement that was created using a com.mockrunner.mock.jdbc.MockConnection by its index.
public  MockPreparedStatementgetPreparedStatement(String sql)
     Returns a com.mockrunner.mock.jdbc.MockPreparedStatement that was created using a com.mockrunner.mock.jdbc.MockConnection by its SQL statement.
public  ObjectgetPreparedStatementParameter(PreparedStatement statement, int indexOfParameter)
     Returns a parameter that was added to a PreparedStatement using its set methods.
public  ObjectgetPreparedStatementParameter(String sql, int indexOfParameter)
     Returns a parameter that was added to a PreparedStatement using its set methods.
public  ObjectgetPreparedStatementParameter(int indexOfStatement, int indexOfParameter)
     Returns an object that was added to a PreparedStatement using its set methods.
public  PreparedStatementResultSetHandlergetPreparedStatementResultSetHandler()
     Returns the PreparedStatementResultSetHandler .
public  ListgetPreparedStatements()
     Returns all com.mockrunner.mock.jdbc.MockPreparedStatement objects.
public  ListgetPreparedStatements(String sql)
     Returns all com.mockrunner.mock.jdbc.MockPreparedStatement objects with the specified SQL statement as a List.
public  MockResultSetgetReturnedResultSet(String id)
     Returns the ResultSet objects with the specified id.
public  ListgetReturnedResultSets(String id)
     Returns a List of the ResultSet objects with the specified id.
public  ListgetReturnedResultSets()
     Returns a List of all ResultSet objects that were returned by calling an executeQuery method of a com.mockrunner.mock.jdbc.MockStatement , com.mockrunner.mock.jdbc.MockPreparedStatement or com.mockrunner.mock.jdbc.MockCallableStatement . Please note that the List may contain arrays of ResultSet objects, if a query returned multiple result sets.
public  MockStatementgetStatement(int index)
     Returns a com.mockrunner.mock.jdbc.MockStatement by its index.
public  StatementResultSetHandlergetStatementResultSetHandler()
     Returns the StatementResultSetHandler .
public  ListgetStatements()
     Returns all com.mockrunner.mock.jdbc.MockStatement objects.
public  voidsetCaseSensitive(boolean caseSensitive)
     Set if specified SQL statements should be handled case sensitive. Defaults to to false, i.e.
public  voidsetExactMatch(boolean exactMatch)
     Set if specified SQL statements must match exactly. Defaults to false, i.e.
public  voidsetUseRegularExpressions(boolean useRegularExpressions)
     Set if regular expressions should be used when matching SQL statements.
public  voidverifyAllResultSetsClosed()
     Verifies that all ResultSet objects are closed. Only recognizes ResultSet objects that were actually returned when executing a statement and that were explicitly closed.
public  voidverifyAllStatementsClosed()
     Verifies that all statements, all prepared statements and all callable statements are closed.
public  voidverifyCallableStatementClosed(int index)
     Verifies that a callable statement is closed.
public  voidverifyCallableStatementClosed(String sql)
     Verifies that a callable statement is closed.
public  voidverifyCallableStatementNotPresent(String sql)
     Verifies that a CallableStatement with the specified SQL statement is not present.
public  voidverifyCallableStatementOutParameterRegistered(CallableStatement statement, int indexOfParameter)
     Verifies that an out parameter was registered on the specified CallableStatement.
public  voidverifyCallableStatementOutParameterRegistered(String sql, int indexOfParameter)
     Verifies that an out parameter was registered on the CallableStatement with the specified SQL.
public  voidverifyCallableStatementOutParameterRegistered(int indexOfStatement, int indexOfParameter)
     Verifies that an out parameter was registered on the CallableStatement with the specified index.
public  voidverifyCallableStatementOutParameterRegistered(CallableStatement statement, String nameOfParameter)
     Verifies that an out parameter was registered on the specified CallableStatement.
public  voidverifyCallableStatementOutParameterRegistered(String sql, String nameOfParameter)
     Verifies that an out parameter was registered on the CallableStatement with the specified SQL.
public  voidverifyCallableStatementOutParameterRegistered(int indexOfStatement, String nameOfParameter)
     Verifies that an out parameter was registered on the CallableStatement with the specified index.
public  voidverifyCallableStatementParameter(CallableStatement statement, int indexOfParameter, Object object)
     Verifies that a parameter from the specified CallableStatement is equal to the specified object.
public  voidverifyCallableStatementParameter(String sql, int indexOfParameter, Object object)
     Verifies that a parameter from the CallableStatement with the specified SQL statement is equal to the specified object.
public  voidverifyCallableStatementParameter(int indexOfStatement, int indexOfParameter, Object object)
     Verifies that a parameter from the CallableStatement with the specified SQL statement is equal to the specified object.
public  voidverifyCallableStatementParameter(CallableStatement statement, String nameOfParameter, Object object)
     Verifies that a parameter from the specified CallableStatement is equal to the specified object.
public  voidverifyCallableStatementParameter(String sql, String nameOfParameter, Object object)
     Verifies that a parameter from the CallableStatement with the specified SQL statement is equal to the specified object.
public  voidverifyCallableStatementParameter(int indexOfStatement, String nameOfParameter, Object object)
     Verifies that a parameter from the CallableStatement with the specified SQL statement is equal to the specified object.
public  voidverifyCallableStatementParameterNotPresent(CallableStatement statement, int indexOfParameter)
     Verifies that a parameter with the specified index is not present.
public  voidverifyCallableStatementParameterNotPresent(String sql, int indexOfParameter)
     Verifies that a parameter with the specified index is not present.
public  voidverifyCallableStatementParameterNotPresent(int indexOfStatement, int indexOfParameter)
     Verifies that a parameter with the specified index is not present.
public  voidverifyCallableStatementParameterNotPresent(CallableStatement statement, String nameOfParameter)
     Verifies that a parameter with the specified index is not present.
public  voidverifyCallableStatementParameterNotPresent(String sql, String nameOfParameter)
     Verifies that a parameter with the specified index is not present.
public  voidverifyCallableStatementParameterNotPresent(int indexOfStatement, String nameOfParameter)
     Verifies that a parameter with the specified index is not present.
public  voidverifyCallableStatementParameterPresent(CallableStatement statement, int indexOfParameter)
     Verifies that a parameter was added to a CallableStatement with the specified index.
public  voidverifyCallableStatementParameterPresent(String sql, int indexOfParameter)
     Verifies that a parameter was added to a CallableStatement with the specified index.
public  voidverifyCallableStatementParameterPresent(int indexOfStatement, int indexOfParameter)
     Verifies that a parameter was added to a CallableStatement with the specified index.
public  voidverifyCallableStatementParameterPresent(CallableStatement statement, String nameOfParameter)
     Verifies that a parameter was added to a CallableStatement with the specified index.
public  voidverifyCallableStatementParameterPresent(String sql, String nameOfParameter)
     Verifies that a parameter was added to a CallableStatement with the specified index.
public  voidverifyCallableStatementParameterPresent(int indexOfStatement, String nameOfParameter)
     Verifies that a parameter was added to a CallableStatement with the specified index.
public  voidverifyCallableStatementPresent(String sql)
     Verifies that a CallableStatement with the specified SQL statement is present.
public  voidverifyCommitted()
     Verifies that the changes were commited, i.e.
public  voidverifyConnectionClosed()
     Verifies that the connection is closed.
public  voidverifyNotCommitted()
     Verifies that the changes were not commited. Makes only sense, if the Connection is not in autocommit mode.
public  voidverifyNotRolledBack()
     Verifies that the changes were not rolled back.
public  voidverifyNumberCallableStatements(int number)
     Verifies the number of callable statements.
public  voidverifyNumberCallableStatements(int number, String sql)
     Verifies the number of callable statements with the specified SQL.
public  voidverifyNumberCommits(int number)
     Verifies the number of commit calls.
public  voidverifyNumberPreparedStatements(int number)
     Verifies the number of prepared statements.
public  voidverifyNumberPreparedStatements(int number, String sql)
     Verifies the number of prepared statements with the specified SQL.
public  voidverifyNumberRollbacks(int number)
     Verifies the number of rollback calls.
public  voidverifyNumberStatements(int number)
     Verifies the number of statements.
public  voidverifyPreparedStatementClosed(int index)
     Verifies that a prepared statement is closed.
public  voidverifyPreparedStatementClosed(String sql)
     Verifies that a prepared statement is closed.
public  voidverifyPreparedStatementNotPresent(String sql)
     Verifies that a PreparedStatement with the specified SQL statement is not present.
public  voidverifyPreparedStatementParameter(PreparedStatement statement, int indexOfParameter, Object object)
     Verifies that a parameter from the specified PreparedStatement is equal to the specified object.
public  voidverifyPreparedStatementParameter(String sql, int indexOfParameter, Object object)
     Verifies that a parameter from the PreparedStatement with the specified SQL statement is equal to the specified object.
public  voidverifyPreparedStatementParameter(int indexOfStatement, int indexOfParameter, Object object)
     Verifies that a parameter from the PreparedStatement with the specified SQL statement is equal to the specified object.
public  voidverifyPreparedStatementParameterNotPresent(PreparedStatement statement, int indexOfParameter)
     Verifies that a parameter with the specified index is not present.
public  voidverifyPreparedStatementParameterNotPresent(String sql, int indexOfParameter)
     Verifies that a parameter with the specified index is not present.
public  voidverifyPreparedStatementParameterNotPresent(int indexOfStatement, int indexOfParameter)
     Verifies that a parameter with the specified index is not present.
public  voidverifyPreparedStatementParameterPresent(PreparedStatement statement, int indexOfParameter)
     Verifies that a parameter was added to a PreparedStatement with the specified index.
public  voidverifyPreparedStatementParameterPresent(String sql, int indexOfParameter)
     Verifies that a parameter was added to a PreparedStatement with the specified index.
public  voidverifyPreparedStatementParameterPresent(int indexOfStatement, int indexOfParameter)
     Verifies that a parameter was added to a PreparedStatement with the specified index.
public  voidverifyPreparedStatementPresent(String sql)
     Verifies that a PreparedStatement with the specified SQL statement is present.
public  voidverifyResultSetClosed(String id)
     Verifies that the ResultSet with the specified id is closed.
public  voidverifyResultSetColumn(MockResultSet resultSet, int number, List columnData)
     Verifies that a column of a ResultSet is equal to the entries in the specified List.
public  voidverifyResultSetColumn(MockResultSet resultSet, int number, Object[] columnData)
     Verifies that a column of a ResultSet is equal to the entries in the specified array.
public  voidverifyResultSetColumn(String id, int number, List columnData)
     Verifies that a column of a ResultSet is equal to the entries in the specified List.
public  voidverifyResultSetColumn(String id, int number, Object[] columnData)
     Verifies that a column of a ResultSet is equal to the entries in the specified array.
public  voidverifyResultSetColumn(MockResultSet resultSet, String name, List columnData)
     Verifies that a column of a ResultSet is equal to the entries in the specified List.
public  voidverifyResultSetColumn(MockResultSet resultSet, String name, Object[] columnData)
     Verifies that a column of a ResultSet is equal to the entries in the specified array.
public  voidverifyResultSetColumn(String id, String name, List columnData)
     Verifies that a column of a ResultSet is equal to the entries in the specified List.
public  voidverifyResultSetColumn(String id, String name, Object[] columnData)
     Verifies that a column of a ResultSet is equal to the entries in the specified array.
public  voidverifyResultSetEquals(MockResultSet source, MockResultSet target)
     Verifies that a ResultSet is equal to another one.
public  voidverifyResultSetEquals(String id, MockResultSet target)
     Verifies that a ResultSet is equal to another one.
public  voidverifyResultSetRow(MockResultSet resultSet, int number, List rowData)
     Verifies that a row of a ResultSet is equal to the entries in the specified List.
public  voidverifyResultSetRow(MockResultSet resultSet, int number, Object[] rowData)
     Verifies that a row of a ResultSet is equal to the entries in the specified array.
public  voidverifyResultSetRow(String id, int number, List rowData)
     Verifies that a row of a ResultSet is equal to the entries in the specified List.
public  voidverifyResultSetRow(String id, int number, Object[] rowData)
     Verifies that a row of a ResultSet is equal to the entries in the specified array.
public  voidverifyResultSetRowDeleted(MockResultSet resultSet, int number)
     Verifies that the specified row of a ResultSet was deleted.
public  voidverifyResultSetRowDeleted(String id, int number)
     Verifies that the specified row of a ResultSet was deleted.
public  voidverifyResultSetRowInserted(MockResultSet resultSet, int number)
     Verifies that the specified row of a ResultSet was inserted.
public  voidverifyResultSetRowInserted(String id, int number)
     Verifies that the specified row of a ResultSet was inserted.
public  voidverifyResultSetRowNotDeleted(MockResultSet resultSet, int number)
     Verifies that the specified row of a ResultSet was not deleted.
public  voidverifyResultSetRowNotDeleted(String id, int number)
     Verifies that the specified row of a ResultSet was not deleted.
public  voidverifyResultSetRowNotInserted(MockResultSet resultSet, int number)
     Verifies that the specified row of a ResultSet was not inserted.
public  voidverifyResultSetRowNotInserted(String id, int number)
     Verifies that the specified row of a ResultSet was not inserted.
public  voidverifyResultSetRowNotUpdated(MockResultSet resultSet, int number)
     Verifies that the specified row of a ResultSet was not updated.
public  voidverifyResultSetRowNotUpdated(String id, int number)
     Verifies that the specified row of a ResultSet was not updated.
public  voidverifyResultSetRowUpdated(MockResultSet resultSet, int number)
     Verifies that the specified row of a ResultSet was updated.
public  voidverifyResultSetRowUpdated(String id, int number)
     Verifies that the specified row of a ResultSet was updated.
public  voidverifyRolledBack()
     Verifies that the changes were rolled back, i.e.
public  voidverifySQLStatementExecuted(String sql)
     Verifies that an SQL statement was executed.
public  voidverifySQLStatementNotExecuted(String sql)
     Verifies that an SQL statement was not executed.
public  voidverifySQLStatementParameter(String sql, int indexOfParameterSet, Map parameterMap)
     Verifies the parameters for the specified SQL statement. If more than one SQL statement is found, this method uses the first one.
public  voidverifySQLStatementParameter(String sql, int indexOfParameterSet, int indexOfParameter, 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.
public  voidverifySQLStatementParameter(String sql, int indexOfParameterSet, String nameOfParameter, 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.
public  voidverifySQLStatementParameterNumber(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.
public  voidverifyStatementClosed(int index)
     Verifies that a statement is closed.


Constructor Detail
JDBCTestModule
public JDBCTestModule(JDBCMockObjectFactory mockFactory)(Code)




Method Detail
getCallableStatement
public MockCallableStatement getCallableStatement(int index)(Code)
Returns a com.mockrunner.mock.jdbc.MockCallableStatement that was created using a com.mockrunner.mock.jdbc.MockConnection by its index.
Parameters:
  index - the index of the CallableStatement the CallableStatement or null, if there is no suchCallableStatement



getCallableStatement
public MockCallableStatement getCallableStatement(String sql)(Code)
Returns a com.mockrunner.mock.jdbc.MockCallableStatement that was created using a com.mockrunner.mock.jdbc.MockConnection by its SQL statement. If there are more than one com.mockrunner.mock.jdbc.MockCallableStatement objects with the specified SQL, the first one will be returned. Please note that you can modify the search parameters with JDBCTestModule.setCaseSensitive , JDBCTestModule.setExactMatch and JDBCTestModule.setUseRegularExpressions .
Parameters:
  sql - the SQL statement used to create the CallableStatement the CallableStatement or null, if there is no macth



getCallableStatementParameter
public Object getCallableStatementParameter(CallableStatement statement, int indexOfParameter)(Code)
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
Parameters:
  indexOfParameter - the index used to set the parameter the corresponding object



getCallableStatementParameter
public Object getCallableStatementParameter(String sql, int indexOfParameter)(Code)
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
Parameters:
  indexOfParameter - the index used to set the object the corresponding object



getCallableStatementParameter
public Object getCallableStatementParameter(int indexOfStatement, int indexOfParameter)(Code)
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
Parameters:
  indexOfParameter - the index used to set the object the corresponding object



getCallableStatementParameter
public Object getCallableStatementParameter(CallableStatement statement, String nameOfParameter)(Code)
Returns a parameter that was added to a CallableStatement using its set methods.
Parameters:
  statement - the CallableStatement
Parameters:
  nameOfParameter - the name of the parameter the corresponding object



getCallableStatementParameter
public Object getCallableStatementParameter(String sql, String nameOfParameter)(Code)
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
Parameters:
  nameOfParameter - the name of the parameter the corresponding object



getCallableStatementParameter
public Object getCallableStatementParameter(int indexOfStatement, String nameOfParameter)(Code)
Returns an object that was added to a CallableStatement using its set methods.
Parameters:
  indexOfStatement - the index of the statement
Parameters:
  nameOfParameter - the name of the parameter the corresponding object



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



getCallableStatements
public List getCallableStatements()(Code)
Returns all com.mockrunner.mock.jdbc.MockCallableStatement objects. the List of CallableStatement objects



getCallableStatements
public List getCallableStatements(String sql)(Code)
Returns all com.mockrunner.mock.jdbc.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 JDBCTestModule.setCaseSensitive , JDBCTestModule.setExactMatch and JDBCTestModule.setUseRegularExpressions .
Parameters:
  sql - the SQL statement used to create the CallableStatement the List of CallableStatement objects



getExecutedSQLStatementParameter
public Map getExecutedSQLStatementParameter()(Code)
JDBCTestModule.getExecutedSQLStatementParameterMap



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



getExecutedSQLStatementParameterSets
public ParameterSets getExecutedSQLStatementParameterSets(String sql)(Code)
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 the ParameterSets object or null if nomatching object is found



getExecutedSQLStatements
public List getExecutedSQLStatements()(Code)
Returns a List of all SQL statements that were executed by calling an execute method of a com.mockrunner.mock.jdbc.MockStatement , com.mockrunner.mock.jdbc.MockPreparedStatement or com.mockrunner.mock.jdbc.MockCallableStatement . the List of SQL statements



getPreparedStatement
public MockPreparedStatement getPreparedStatement(int index)(Code)
Returns a com.mockrunner.mock.jdbc.MockPreparedStatement that was created using a com.mockrunner.mock.jdbc.MockConnection by its index.
Parameters:
  index - the index of the PreparedStatement the PreparedStatement or null, if there is no suchPreparedStatement



getPreparedStatement
public MockPreparedStatement getPreparedStatement(String sql)(Code)
Returns a com.mockrunner.mock.jdbc.MockPreparedStatement that was created using a com.mockrunner.mock.jdbc.MockConnection by its SQL statement. If there are more than one com.mockrunner.mock.jdbc.MockPreparedStatement objects with the specified SQL, the first one will be returned. Please note that you can modify the search parameters with JDBCTestModule.setCaseSensitive , JDBCTestModule.setExactMatch and JDBCTestModule.setUseRegularExpressions .
Parameters:
  sql - the SQL statement used to create the PreparedStatement the PreparedStatement or null, if there is no macth



getPreparedStatementParameter
public Object getPreparedStatementParameter(PreparedStatement statement, int indexOfParameter)(Code)
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
Parameters:
  indexOfParameter - the index used to set the parameter the corresponding object



getPreparedStatementParameter
public Object getPreparedStatementParameter(String sql, int indexOfParameter)(Code)
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
Parameters:
  indexOfParameter - the index used to set the object the corresponding object



getPreparedStatementParameter
public Object getPreparedStatementParameter(int indexOfStatement, int indexOfParameter)(Code)
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
Parameters:
  indexOfParameter - the index used to set the object the corresponding object



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



getPreparedStatements
public List getPreparedStatements()(Code)
Returns all com.mockrunner.mock.jdbc.MockPreparedStatement objects. the List of PreparedStatement objects



getPreparedStatements
public List getPreparedStatements(String sql)(Code)
Returns all com.mockrunner.mock.jdbc.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 JDBCTestModule.setCaseSensitive , JDBCTestModule.setExactMatch and JDBCTestModule.setUseRegularExpressions .
Parameters:
  sql - the SQL statement used to create the PreparedStatement the List of PreparedStatement objects



getReturnedResultSet
public MockResultSet getReturnedResultSet(String id)(Code)
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 JDBCTestModule.getReturnedResultSets(String) . the ResultSet with the specified id



getReturnedResultSets
public List getReturnedResultSets(String id)(Code)
Returns a List of the ResultSet objects with the specified id. In contrast to JDBCTestModule.getReturnedResultSets , the returned List never contains ResultSet[] objects, only single result sets. If JDBCTestModule.getReturnedResultSets 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. the List of ResultSet objects



getReturnedResultSets
public List getReturnedResultSets()(Code)
Returns a List of all ResultSet objects that were returned by calling an executeQuery method of a com.mockrunner.mock.jdbc.MockStatement , com.mockrunner.mock.jdbc.MockPreparedStatement or com.mockrunner.mock.jdbc.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 com.mockrunner.mock.jdbc.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. the List of ResultSet or ResultSet[] objects



getStatement
public MockStatement getStatement(int index)(Code)
Returns a com.mockrunner.mock.jdbc.MockStatement by its index.
Parameters:
  index - the index of the Statement the Statement or null, if there is no suchStatement



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



getStatements
public List getStatements()(Code)
Returns all com.mockrunner.mock.jdbc.MockStatement objects. the List of Statement objects



setCaseSensitive
public void setCaseSensitive(boolean caseSensitive)(Code)
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 JDBCTestModule.getPreparedStatements(String) returns or what statements are taken into account by the method JDBCTestModule.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)(Code)
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 JDBCTestModule.getPreparedStatements(String) returns or what statements are taken into account by the method JDBCTestModule.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)(Code)
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 JDBCTestModule.getPreparedStatements(String) returns or what statements are taken into account by the method JDBCTestModule.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



verifyAllResultSetsClosed
public void verifyAllResultSetsClosed()(Code)
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



verifyAllStatementsClosed
public void verifyAllStatementsClosed()(Code)
Verifies that all statements, all prepared statements and all callable statements are closed.
throws:
  VerifyFailedException - if verification fails



verifyCallableStatementClosed
public void verifyCallableStatementClosed(int index)(Code)
Verifies that a callable statement is closed.
Parameters:
  index - the index of the callable statement
throws:
  VerifyFailedException - if verification fails



verifyCallableStatementClosed
public void verifyCallableStatementClosed(String sql)(Code)
Verifies that a callable statement is closed.
Parameters:
  sql - the SQL statement
throws:
  VerifyFailedException - if verification fails



verifyCallableStatementNotPresent
public void verifyCallableStatementNotPresent(String sql)(Code)
Verifies that a CallableStatement with the specified SQL statement is not present.
Parameters:
  sql - the SQL statement
throws:
  VerifyFailedException - if verification fails



verifyCallableStatementOutParameterRegistered
public void verifyCallableStatementOutParameterRegistered(CallableStatement statement, int indexOfParameter)(Code)
Verifies that an out parameter was registered on the specified CallableStatement.
Parameters:
  statement - the CallableStatement
Parameters:
  indexOfParameter - the index of the parameter
throws:
  VerifyFailedException - if verification fails



verifyCallableStatementOutParameterRegistered
public void verifyCallableStatementOutParameterRegistered(String sql, int indexOfParameter)(Code)
Verifies that an out parameter was registered on the CallableStatement with the specified SQL.
Parameters:
  sql - the SQL statement
Parameters:
  indexOfParameter - the index of the parameter
throws:
  VerifyFailedException - if verification fails



verifyCallableStatementOutParameterRegistered
public void verifyCallableStatementOutParameterRegistered(int indexOfStatement, int indexOfParameter)(Code)
Verifies that an out parameter was registered on the CallableStatement with the specified index.
Parameters:
  indexOfStatement - the index of the CallableStatement
Parameters:
  indexOfParameter - the index of the parameter
throws:
  VerifyFailedException - if verification fails



verifyCallableStatementOutParameterRegistered
public void verifyCallableStatementOutParameterRegistered(CallableStatement statement, String nameOfParameter)(Code)
Verifies that an out parameter was registered on the specified CallableStatement.
Parameters:
  statement - the CallableStatement
Parameters:
  nameOfParameter - the name of the parameter
throws:
  VerifyFailedException - if verification fails



verifyCallableStatementOutParameterRegistered
public void verifyCallableStatementOutParameterRegistered(String sql, String nameOfParameter)(Code)
Verifies that an out parameter was registered on the CallableStatement with the specified SQL.
Parameters:
  sql - the SQL statement
Parameters:
  nameOfParameter - the name of the parameter
throws:
  VerifyFailedException - if verification fails



verifyCallableStatementOutParameterRegistered
public void verifyCallableStatementOutParameterRegistered(int indexOfStatement, String nameOfParameter)(Code)
Verifies that an out parameter was registered on the CallableStatement with the specified index.
Parameters:
  indexOfStatement - the index of the CallableStatement
Parameters:
  nameOfParameter - the name of the parameter
throws:
  VerifyFailedException - if verification fails



verifyCallableStatementParameter
public void verifyCallableStatementParameter(CallableStatement statement, int indexOfParameter, Object object)(Code)
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
Parameters:
  indexOfParameter - the index used to set the object
Parameters:
  object - the expected object
throws:
  VerifyFailedException - if verification fails



verifyCallableStatementParameter
public void verifyCallableStatementParameter(String sql, int indexOfParameter, Object object)(Code)
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
Parameters:
  indexOfParameter - the index used to set the object
Parameters:
  object - the expected object
throws:
  VerifyFailedException - if verification fails



verifyCallableStatementParameter
public void verifyCallableStatementParameter(int indexOfStatement, int indexOfParameter, Object object)(Code)
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
Parameters:
  indexOfParameter - the index used to set the object
Parameters:
  object - the expected object
throws:
  VerifyFailedException - if verification fails



verifyCallableStatementParameter
public void verifyCallableStatementParameter(CallableStatement statement, String nameOfParameter, Object object)(Code)
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
Parameters:
  nameOfParameter - the name of the parameter
Parameters:
  object - the expected object
throws:
  VerifyFailedException - if verification fails



verifyCallableStatementParameter
public void verifyCallableStatementParameter(String sql, String nameOfParameter, Object object)(Code)
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
Parameters:
  nameOfParameter - the name of the parameter
Parameters:
  object - the expected object
throws:
  VerifyFailedException - if verification fails



verifyCallableStatementParameter
public void verifyCallableStatementParameter(int indexOfStatement, String nameOfParameter, Object object)(Code)
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
Parameters:
  nameOfParameter - the name of the parameter
Parameters:
  object - the expected object
throws:
  VerifyFailedException - if verification fails



verifyCallableStatementParameterNotPresent
public void verifyCallableStatementParameterNotPresent(CallableStatement statement, int indexOfParameter)(Code)
Verifies that a parameter with the specified index is not present.
Parameters:
  statement - the CallableStatement
Parameters:
  indexOfParameter - the index used to set the object
throws:
  VerifyFailedException - if verification fails



verifyCallableStatementParameterNotPresent
public void verifyCallableStatementParameterNotPresent(String sql, int indexOfParameter)(Code)
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
Parameters:
  indexOfParameter - the index used to set the object
throws:
  VerifyFailedException - if verification fails



verifyCallableStatementParameterNotPresent
public void verifyCallableStatementParameterNotPresent(int indexOfStatement, int indexOfParameter)(Code)
Verifies that a parameter with the specified index is not present.
Parameters:
  indexOfStatement - the index of the statement
Parameters:
  indexOfParameter - the index used to set the object
throws:
  VerifyFailedException - if verification fails



verifyCallableStatementParameterNotPresent
public void verifyCallableStatementParameterNotPresent(CallableStatement statement, String nameOfParameter)(Code)
Verifies that a parameter with the specified index is not present.
Parameters:
  statement - the CallableStatement
Parameters:
  nameOfParameter - the name of the parameter
throws:
  VerifyFailedException - if verification fails



verifyCallableStatementParameterNotPresent
public void verifyCallableStatementParameterNotPresent(String sql, String nameOfParameter)(Code)
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
Parameters:
  nameOfParameter - the name of the parameter
throws:
  VerifyFailedException - if verification fails



verifyCallableStatementParameterNotPresent
public void verifyCallableStatementParameterNotPresent(int indexOfStatement, String nameOfParameter)(Code)
Verifies that a parameter with the specified index is not present.
Parameters:
  indexOfStatement - the index of the statement
Parameters:
  nameOfParameter - the name of the parameter
throws:
  VerifyFailedException - if verification fails



verifyCallableStatementParameterPresent
public void verifyCallableStatementParameterPresent(CallableStatement statement, int indexOfParameter)(Code)
Verifies that a parameter was added to a CallableStatement with the specified index.
Parameters:
  statement - the CallableStatement
Parameters:
  indexOfParameter - the index used to set the object
throws:
  VerifyFailedException - if verification fails



verifyCallableStatementParameterPresent
public void verifyCallableStatementParameterPresent(String sql, int indexOfParameter)(Code)
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
Parameters:
  indexOfParameter - the index used to set the object
throws:
  VerifyFailedException - if verification fails



verifyCallableStatementParameterPresent
public void verifyCallableStatementParameterPresent(int indexOfStatement, int indexOfParameter)(Code)
Verifies that a parameter was added to a CallableStatement with the specified index.
Parameters:
  indexOfStatement - the index of the statement
Parameters:
  indexOfParameter - the index used to set the object
throws:
  VerifyFailedException - if verification fails



verifyCallableStatementParameterPresent
public void verifyCallableStatementParameterPresent(CallableStatement statement, String nameOfParameter)(Code)
Verifies that a parameter was added to a CallableStatement with the specified index.
Parameters:
  statement - the CallableStatement
Parameters:
  nameOfParameter - the name of the parameter
throws:
  VerifyFailedException - if verification fails



verifyCallableStatementParameterPresent
public void verifyCallableStatementParameterPresent(String sql, String nameOfParameter)(Code)
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
Parameters:
  nameOfParameter - the name of the parameter
throws:
  VerifyFailedException - if verification fails



verifyCallableStatementParameterPresent
public void verifyCallableStatementParameterPresent(int indexOfStatement, String nameOfParameter)(Code)
Verifies that a parameter was added to a CallableStatement with the specified index.
Parameters:
  indexOfStatement - the index of the statement
Parameters:
  nameOfParameter - the name of the parameter
throws:
  VerifyFailedException - if verification fails



verifyCallableStatementPresent
public void verifyCallableStatementPresent(String sql)(Code)
Verifies that a CallableStatement with the specified SQL statement is present.
Parameters:
  sql - the SQL statement
throws:
  VerifyFailedException - if verification fails



verifyCommitted
public void verifyCommitted()(Code)
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



verifyConnectionClosed
public void verifyConnectionClosed()(Code)
Verifies that the connection is closed.
throws:
  VerifyFailedException - if verification fails



verifyNotCommitted
public void verifyNotCommitted()(Code)
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



verifyNotRolledBack
public void verifyNotRolledBack()(Code)
Verifies that the changes were not rolled back. Makes only sense, if the Connection is not in autocommit mode.
throws:
  VerifyFailedException - if verification fails



verifyNumberCallableStatements
public void verifyNumberCallableStatements(int number)(Code)
Verifies the number of callable statements.
Parameters:
  number - the expected number
throws:
  VerifyFailedException - if verification fails



verifyNumberCallableStatements
public void verifyNumberCallableStatements(int number, String sql)(Code)
Verifies the number of callable statements with the specified SQL.
Parameters:
  number - the expected number
Parameters:
  sql - the SQL
throws:
  VerifyFailedException - if verification fails



verifyNumberCommits
public void verifyNumberCommits(int number)(Code)
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



verifyNumberPreparedStatements
public void verifyNumberPreparedStatements(int number)(Code)
Verifies the number of prepared statements.
Parameters:
  number - the expected number
throws:
  VerifyFailedException - if verification fails



verifyNumberPreparedStatements
public void verifyNumberPreparedStatements(int number, String sql)(Code)
Verifies the number of prepared statements with the specified SQL.
Parameters:
  number - the expected number
Parameters:
  sql - the SQL
throws:
  VerifyFailedException - if verification fails



verifyNumberRollbacks
public void verifyNumberRollbacks(int number)(Code)
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)(Code)
Verifies the number of statements.
Parameters:
  number - the expected number
throws:
  VerifyFailedException - if verification fails



verifyPreparedStatementClosed
public void verifyPreparedStatementClosed(int index)(Code)
Verifies that a prepared statement is closed.
Parameters:
  index - the index of the prepared statement
throws:
  VerifyFailedException - if verification fails



verifyPreparedStatementClosed
public void verifyPreparedStatementClosed(String sql)(Code)
Verifies that a prepared statement is closed.
Parameters:
  sql - the SQL statement
throws:
  VerifyFailedException - if verification fails



verifyPreparedStatementNotPresent
public void verifyPreparedStatementNotPresent(String sql)(Code)
Verifies that a PreparedStatement with the specified SQL statement is not present.
Parameters:
  sql - the SQL statement
throws:
  VerifyFailedException - if verification fails



verifyPreparedStatementParameter
public void verifyPreparedStatementParameter(PreparedStatement statement, int indexOfParameter, Object object)(Code)
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
Parameters:
  indexOfParameter - the index used to set the object
Parameters:
  object - the expected object
throws:
  VerifyFailedException - if verification fails



verifyPreparedStatementParameter
public void verifyPreparedStatementParameter(String sql, int indexOfParameter, Object object)(Code)
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
Parameters:
  indexOfParameter - the index used to set the object
Parameters:
  object - the expected object
throws:
  VerifyFailedException - if verification fails



verifyPreparedStatementParameter
public void verifyPreparedStatementParameter(int indexOfStatement, int indexOfParameter, Object object)(Code)
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
Parameters:
  indexOfParameter - the index used to set the object
Parameters:
  object - the expected object
throws:
  VerifyFailedException - if verification fails



verifyPreparedStatementParameterNotPresent
public void verifyPreparedStatementParameterNotPresent(PreparedStatement statement, int indexOfParameter)(Code)
Verifies that a parameter with the specified index is not present.
Parameters:
  statement - the PreparedStatement
Parameters:
  indexOfParameter - the index used to set the object
throws:
  VerifyFailedException - if verification fails



verifyPreparedStatementParameterNotPresent
public void verifyPreparedStatementParameterNotPresent(String sql, int indexOfParameter)(Code)
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
Parameters:
  indexOfParameter - the index used to set the object
throws:
  VerifyFailedException - if verification fails



verifyPreparedStatementParameterNotPresent
public void verifyPreparedStatementParameterNotPresent(int indexOfStatement, int indexOfParameter)(Code)
Verifies that a parameter with the specified index is not present.
Parameters:
  indexOfStatement - the index of the statement
Parameters:
  indexOfParameter - the index used to set the object
throws:
  VerifyFailedException - if verification fails



verifyPreparedStatementParameterPresent
public void verifyPreparedStatementParameterPresent(PreparedStatement statement, int indexOfParameter)(Code)
Verifies that a parameter was added to a PreparedStatement with the specified index.
Parameters:
  statement - the PreparedStatement
Parameters:
  indexOfParameter - the index used to set the object
throws:
  VerifyFailedException - if verification fails



verifyPreparedStatementParameterPresent
public void verifyPreparedStatementParameterPresent(String sql, int indexOfParameter)(Code)
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
Parameters:
  indexOfParameter - the index used to set the object
throws:
  VerifyFailedException - if verification fails



verifyPreparedStatementParameterPresent
public void verifyPreparedStatementParameterPresent(int indexOfStatement, int indexOfParameter)(Code)
Verifies that a parameter was added to a PreparedStatement with the specified index.
Parameters:
  indexOfStatement - the index of the statement
Parameters:
  indexOfParameter - the index used to set the object
throws:
  VerifyFailedException - if verification fails



verifyPreparedStatementPresent
public void verifyPreparedStatementPresent(String sql)(Code)
Verifies that a PreparedStatement with the specified SQL statement is present.
Parameters:
  sql - the SQL statement
throws:
  VerifyFailedException - if verification fails



verifyResultSetClosed
public void verifyResultSetClosed(String id)(Code)
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



verifyResultSetColumn
public void verifyResultSetColumn(MockResultSet resultSet, int number, List columnData)(Code)
Verifies that a column of a ResultSet is equal to the entries in the specified List. Uses com.mockrunner.mock.jdbc.MockResultSet.isColumnEqual(intList) . You can verify the data of returned ResultSet objects if the tested JDBC code makes updates.
Parameters:
  resultSet - the ResultSet
Parameters:
  number - the number of the column
Parameters:
  columnData - the column data
throws:
  VerifyFailedException - if verification fails



verifyResultSetColumn
public void verifyResultSetColumn(MockResultSet resultSet, int number, Object[] columnData)(Code)
Verifies that a column of a ResultSet is equal to the entries in the specified array. Uses com.mockrunner.mock.jdbc.MockResultSet.isColumnEqual(intList) . You can verify the data of returned ResultSet objects if the tested JDBC code makes updates.
Parameters:
  resultSet - the ResultSet
Parameters:
  number - the number of the column
Parameters:
  columnData - the column data
throws:
  VerifyFailedException - if verification fails



verifyResultSetColumn
public void verifyResultSetColumn(String id, int number, List columnData)(Code)
Verifies that a column of a ResultSet is equal to the entries in the specified List. Uses com.mockrunner.mock.jdbc.MockResultSet.isColumnEqual(intList) . You can verify the data of returned ResultSet objects if the tested JDBC code makes updates.
Parameters:
  id - the id of the ResultSet
Parameters:
  number - the number of the column
Parameters:
  columnData - the column data
throws:
  VerifyFailedException - if verification fails



verifyResultSetColumn
public void verifyResultSetColumn(String id, int number, Object[] columnData)(Code)
Verifies that a column of a ResultSet is equal to the entries in the specified array. Uses com.mockrunner.mock.jdbc.MockResultSet.isColumnEqual(intList) . You can verify the data of returned ResultSet objects if the tested JDBC code makes updates.
Parameters:
  id - the id of the ResultSet
Parameters:
  number - the number of the column
Parameters:
  columnData - the column data
throws:
  VerifyFailedException - if verification fails



verifyResultSetColumn
public void verifyResultSetColumn(MockResultSet resultSet, String name, List columnData)(Code)
Verifies that a column of a ResultSet is equal to the entries in the specified List. Uses com.mockrunner.mock.jdbc.MockResultSet.isColumnEqual(StringList) . You can verify the data of returned ResultSet objects if the tested JDBC code makes updates.
Parameters:
  resultSet - the ResultSet
Parameters:
  name - the name of the column
Parameters:
  columnData - the column data
throws:
  VerifyFailedException - if verification fails



verifyResultSetColumn
public void verifyResultSetColumn(MockResultSet resultSet, String name, Object[] columnData)(Code)
Verifies that a column of a ResultSet is equal to the entries in the specified array. Uses com.mockrunner.mock.jdbc.MockResultSet.isColumnEqual(StringList) . You can verify the data of returned ResultSet objects if the tested JDBC code makes updates.
Parameters:
  resultSet - the ResultSet
Parameters:
  name - the name of the column
Parameters:
  columnData - the column data
throws:
  VerifyFailedException - if verification fails



verifyResultSetColumn
public void verifyResultSetColumn(String id, String name, List columnData)(Code)
Verifies that a column of a ResultSet is equal to the entries in the specified List. Uses com.mockrunner.mock.jdbc.MockResultSet.isColumnEqual(StringList) . You can verify the data of returned ResultSet objects if the tested JDBC code makes updates.
Parameters:
  id - the id of the ResultSet
Parameters:
  name - the name of the column
Parameters:
  columnData - the column data
throws:
  VerifyFailedException - if verification fails



verifyResultSetColumn
public void verifyResultSetColumn(String id, String name, Object[] columnData)(Code)
Verifies that a column of a ResultSet is equal to the entries in the specified array. Uses com.mockrunner.mock.jdbc.MockResultSet.isColumnEqual(StringList) . You can verify the data of returned ResultSet objects if the tested JDBC code makes updates.
Parameters:
  id - the id of the ResultSet
Parameters:
  name - the name of the column
Parameters:
  columnData - the column data
throws:
  VerifyFailedException - if verification fails



verifyResultSetEquals
public void verifyResultSetEquals(MockResultSet source, MockResultSet target)(Code)
Verifies that a ResultSet is equal to another one. Compares all the rows with com.mockrunner.mock.jdbc.MockResultSet.isEqual .
Parameters:
  source - the source ResultSet
Parameters:
  target - the target ResultSet
throws:
  VerifyFailedException - if verification fails



verifyResultSetEquals
public void verifyResultSetEquals(String id, MockResultSet target)(Code)
Verifies that a ResultSet is equal to another one. Compares all the rows with com.mockrunner.jdbc.ParameterUtil.compareParameter .
Parameters:
  id - the id of the source ResultSet
Parameters:
  target - the target ResultSet
throws:
  VerifyFailedException - if verification fails



verifyResultSetRow
public void verifyResultSetRow(MockResultSet resultSet, int number, List rowData)(Code)
Verifies that a row of a ResultSet is equal to the entries in the specified List. Uses com.mockrunner.mock.jdbc.MockResultSet.isRowEqual . You can verify the data of returned ResultSet objects if the tested JDBC code makes updates.
Parameters:
  resultSet - the ResultSet
Parameters:
  number - the number of the row
Parameters:
  rowData - the row data
throws:
  VerifyFailedException - if verification fails



verifyResultSetRow
public void verifyResultSetRow(MockResultSet resultSet, int number, Object[] rowData)(Code)
Verifies that a row of a ResultSet is equal to the entries in the specified array. Uses com.mockrunner.mock.jdbc.MockResultSet.isRowEqual . You can verify the data of returned ResultSet objects if the tested JDBC code makes updates.
Parameters:
  resultSet - the ResultSet
Parameters:
  number - the number of the row
Parameters:
  rowData - the row data
throws:
  VerifyFailedException - if verification fails



verifyResultSetRow
public void verifyResultSetRow(String id, int number, List rowData)(Code)
Verifies that a row of a ResultSet is equal to the entries in the specified List. Uses com.mockrunner.mock.jdbc.MockResultSet.isRowEqual . You can verify the data of returned ResultSet objects if the tested JDBC code makes updates.
Parameters:
  id - the id of the ResultSet
Parameters:
  number - the number of the row
Parameters:
  rowData - the row data
throws:
  VerifyFailedException - if verification fails



verifyResultSetRow
public void verifyResultSetRow(String id, int number, Object[] rowData)(Code)
Verifies that a row of a ResultSet is equal to the entries in the specified array. Uses com.mockrunner.mock.jdbc.MockResultSet.isRowEqual . You can verify the data of returned ResultSet objects if the tested JDBC code makes updates.
Parameters:
  id - the id of the ResultSet
Parameters:
  number - the number of the row
Parameters:
  rowData - the row data
throws:
  VerifyFailedException - if verification fails



verifyResultSetRowDeleted
public void verifyResultSetRowDeleted(MockResultSet resultSet, int number)(Code)
Verifies that the specified row of a ResultSet was deleted.
Parameters:
  resultSet - the ResultSet
Parameters:
  number - the number of the row
throws:
  VerifyFailedException - if verification fails



verifyResultSetRowDeleted
public void verifyResultSetRowDeleted(String id, int number)(Code)
Verifies that the specified row of a ResultSet was deleted.
Parameters:
  id - the id of the ResultSet
Parameters:
  number - the number of the row
throws:
  VerifyFailedException - if verification fails



verifyResultSetRowInserted
public void verifyResultSetRowInserted(MockResultSet resultSet, int number)(Code)
Verifies that the specified row of a ResultSet was inserted.
Parameters:
  resultSet - the ResultSet
Parameters:
  number - the number of the row
throws:
  VerifyFailedException - if verification fails



verifyResultSetRowInserted
public void verifyResultSetRowInserted(String id, int number)(Code)
Verifies that the specified row of a ResultSet was inserted.
Parameters:
  id - the id of the ResultSet
Parameters:
  number - the number of the row
throws:
  VerifyFailedException - if verification fails



verifyResultSetRowNotDeleted
public void verifyResultSetRowNotDeleted(MockResultSet resultSet, int number)(Code)
Verifies that the specified row of a ResultSet was not deleted.
Parameters:
  resultSet - the ResultSet
Parameters:
  number - the number of the row
throws:
  VerifyFailedException - if verification fails



verifyResultSetRowNotDeleted
public void verifyResultSetRowNotDeleted(String id, int number)(Code)
Verifies that the specified row of a ResultSet was not deleted.
Parameters:
  id - the id of the ResultSet
Parameters:
  number - the number of the row
throws:
  VerifyFailedException - if verification fails



verifyResultSetRowNotInserted
public void verifyResultSetRowNotInserted(MockResultSet resultSet, int number)(Code)
Verifies that the specified row of a ResultSet was not inserted.
Parameters:
  resultSet - the ResultSet
Parameters:
  number - the number of the row
throws:
  VerifyFailedException - if verification fails



verifyResultSetRowNotInserted
public void verifyResultSetRowNotInserted(String id, int number)(Code)
Verifies that the specified row of a ResultSet was not inserted.
Parameters:
  id - the id of the ResultSet
Parameters:
  number - the number of the row
throws:
  VerifyFailedException - if verification fails



verifyResultSetRowNotUpdated
public void verifyResultSetRowNotUpdated(MockResultSet resultSet, int number)(Code)
Verifies that the specified row of a ResultSet was not updated.
Parameters:
  resultSet - the ResultSet
Parameters:
  number - the number of the row
throws:
  VerifyFailedException - if verification fails



verifyResultSetRowNotUpdated
public void verifyResultSetRowNotUpdated(String id, int number)(Code)
Verifies that the specified row of a ResultSet was not updated.
Parameters:
  id - the id of the ResultSet
Parameters:
  number - the number of the row
throws:
  VerifyFailedException - if verification fails



verifyResultSetRowUpdated
public void verifyResultSetRowUpdated(MockResultSet resultSet, int number)(Code)
Verifies that the specified row of a ResultSet was updated.
Parameters:
  resultSet - the ResultSet
Parameters:
  number - the number of the row
throws:
  VerifyFailedException - if verification fails



verifyResultSetRowUpdated
public void verifyResultSetRowUpdated(String id, int number)(Code)
Verifies that the specified row of a ResultSet was updated.
Parameters:
  id - the id of the ResultSet
Parameters:
  number - the number of the row
throws:
  VerifyFailedException - if verification fails



verifyRolledBack
public void verifyRolledBack()(Code)
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



verifySQLStatementExecuted
public void verifySQLStatementExecuted(String sql)(Code)
Verifies that an SQL statement was executed.
Parameters:
  sql - the expected SQL string
throws:
  VerifyFailedException - if verification fails



verifySQLStatementNotExecuted
public void verifySQLStatementNotExecuted(String sql)(Code)
Verifies that an SQL statement was not executed.
Parameters:
  sql - the SQL string
throws:
  VerifyFailedException - if verification fails



verifySQLStatementParameter
public void verifySQLStatementParameter(String sql, int indexOfParameterSet, Map parameterMap)(Code)
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 {de.lv1871.util.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
Parameters:
  indexOfParameterSet - the number of the parameter set
Parameters:
  parameterMap - the map of expected parameters
throws:
  VerifyFailedException - if verification fails



verifySQLStatementParameter
public void verifySQLStatementParameter(String sql, int indexOfParameterSet, int indexOfParameter, Object expectedParameter)(Code)
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
Parameters:
  indexOfParameterSet - the number of the parameter set
Parameters:
  indexOfParameter - the index of the parameter
Parameters:
  expectedParameter - the expected parameter
throws:
  VerifyFailedException - if verification fails



verifySQLStatementParameter
public void verifySQLStatementParameter(String sql, int indexOfParameterSet, String nameOfParameter, Object expectedParameter)(Code)
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
Parameters:
  indexOfParameterSet - the number of the parameter set
Parameters:
  nameOfParameter - the name of the parameter
Parameters:
  expectedParameter - the expected parameter
throws:
  VerifyFailedException - if verification fails



verifySQLStatementParameterNumber
public void verifySQLStatementParameterNumber(String sql, int indexOfParameterSet, int number)(Code)
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
Parameters:
  indexOfParameterSet - the number of the parameter set
Parameters:
  number - the expected number of parameters
throws:
  VerifyFailedException - if verification fails



verifyStatementClosed
public void verifyStatementClosed(int index)(Code)
Verifies that a statement is closed.
Parameters:
  index - the index of the statement
throws:
  VerifyFailedException - if verification fails



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.