Package org.dbunit.database
Class MockDatabaseConnection
java.lang.Object
org.dbunit.database.MockDatabaseConnection
- All Implemented Interfaces:
IDatabaseConnection
- Since:
- Mar 16, 2002
- Version:
- $Revision$
- Author:
- Manuel Laflamme
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()createDataSet(String[] tableNames) createQueryTable(String resultName, String sql) createTable(String tableName) createTable(String tableName, PreparedStatement preparedStatement) intgetRowCount(String tableName) intgetRowCount(String tableName, String whereClause) voidsetExpectedCloseCalls(int callsCount) voidsetupConnection(Connection connection) voidsetupDataSet(IDataSet dataSet) voidsetupDataSet(ITable table) voidsetupDataSet(ITable[] tables) voidsetupSchema(String schema) voidsetupStatementFactory(IStatementFactory statementFactory) voidverify()
-
Constructor Details
-
MockDatabaseConnection
public MockDatabaseConnection()
-
-
Method Details
-
setupSchema
-
setupConnection
-
setupDataSet
-
setupDataSet
- Throws:
AmbiguousTableNameException
-
setupDataSet
- Throws:
AmbiguousTableNameException
-
setupStatementFactory
-
setExpectedCloseCalls
public void setExpectedCloseCalls(int callsCount) -
verify
public void verify() -
getConnection
- Specified by:
getConnectionin interfaceIDatabaseConnection- Throws:
SQLException
-
getSchema
- Specified by:
getSchemain interfaceIDatabaseConnection
-
close
- Specified by:
closein interfaceIDatabaseConnection- Throws:
SQLException
-
createDataSet
- Specified by:
createDataSetin interfaceIDatabaseConnection- Throws:
SQLException
-
createDataSet
- Specified by:
createDataSetin interfaceIDatabaseConnection- Throws:
SQLExceptionAmbiguousTableNameException
-
createQueryTable
- Specified by:
createQueryTablein interfaceIDatabaseConnection- Throws:
DataSetExceptionSQLException
-
createTable
public ITable createTable(String tableName, PreparedStatement preparedStatement) throws DataSetException, SQLException - Specified by:
createTablein interfaceIDatabaseConnection- Throws:
DataSetExceptionSQLException
-
createTable
- Specified by:
createTablein interfaceIDatabaseConnection- Throws:
DataSetExceptionSQLException
-
getRowCount
- Specified by:
getRowCountin interfaceIDatabaseConnection- Throws:
SQLException
-
getRowCount
- Specified by:
getRowCountin interfaceIDatabaseConnection- Throws:
SQLException
-
getStatementFactory
- Specified by:
getStatementFactoryin interfaceIDatabaseConnection
-
getConfig
- Specified by:
getConfigin interfaceIDatabaseConnection
-