|
||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES All Classes |
See:
Description
Interface Summary | |
---|---|
IMockDatabase | Provides a convenient abstraction of what a mock database should look like for SQLUnit mock testing. |
Class Summary | |
---|---|
AbstractMockDatabase | Abstract base class from which all IMockDatabase objects must extend. |
ColumnMetaData | Container for Column Metadata information. |
IntrospectingCallableStatementResultSetHandler | Extends the CallableStatementResultSetHandler to use introspection. |
IntrospectingPreparedStatementResultSetHandler | Extends the PreparedStatementResultSetHandler to use introspection. |
IntrospectingResultSetFactory | Introspects a given IMockDataStore object and invokes the named method to return ResultSet objects. |
IntrospectingStatementResultSetHandler | Extends the StatementResultSetHandler to use introspection. |
MockInitialContext | Overrides the InitialContext to provide an in-memory lookup mechanism instead of network lookup. |
MockInitialContextFactory | Builds a MockInitialContext using an environment Hashtable. |
MockResultSetUtils | Collection of utility methods to manipulate MockResultSets. |
SQLUnitMockCallableStatement | Overrides certain methods in the MockCallableStatement class for mock testing of SQLUnit. |
SQLUnitMockConnection | Represents a Connection object that depends on an underlying IDatabase. |
SQLUnitMockDatabase | Mock database to supply results. |
SQLUnitMockDriver | Implements a Mock JDBC driver for SQLUnit. |
SQLUnitMockPreparedStatement | Overrides certain methods in the MockPreparedStatement class for mock testing of SQLUnit. |
SQLUnitMockStatement | Overrides certain methods in the MockStatement class for mock testing of SQLUnit. |
VarSetter | Simple class whose method is called from the set tag. |
Mock Testing framework for SQLUnit. Provides a framework to test SQLUnit code without a database. The database independence is achieved by using the MockRunner JDBC framework.
Instead of a real database, the testing framework relies on introspecting a specified class. The class implements the IMockDatabase interface and contains methods with the signature:
public MockResultSet methodName(Integer resultSetId);
The IMockDatabase interface mandates a getResultSet(String,int) method which returns a MockResultSet. The implementation of this method is provided in the AbstractMockDatabase class. Clients wishing to develop their own mock database classes should extend this class.
Examples of methods that mimic the behavior of stored procedures can be found in the SQLUnitMockDatabase class which extends AbstractMockDatabase. Things to note are:
To make this work with the MockRunner framework, the following classes were extended from the MockRunner distribution:
|
||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES All Classes |