public abstract class AbstractDatabaseTester extends SimpleAssert implements IDatabaseTester
Constructor and Description |
---|
AbstractDatabaseTester() |
AbstractDatabaseTester(String schema) |
Modifier and Type | Method and Description |
---|---|
void |
closeConnection(IDatabaseConnection connection)
Close the specified connection.
|
IDataSet |
getDataSet()
Returns the test dataset.
|
protected String |
getSchema()
Returns the schema value.
|
protected DatabaseOperation |
getSetUpOperation()
Returns the DatabaseOperation to call when starting the test.
|
protected DatabaseOperation |
getTearDownOperation()
Returns the DatabaseOperation to call when ending the test.
|
void |
onSetup()
TestCases must call this method inside setUp()
|
void |
onTearDown()
TestCases must call this method inside tearDown()
|
void |
setDataSet(IDataSet dataSet)
Sets the test dataset to use.
|
void |
setOperationListener(IOperationListener operationListener) |
void |
setSchema(String schema)
Sets the schema value.
|
void |
setSetUpOperation(DatabaseOperation setUpOperation)
Sets the DatabaseOperation to call when starting the test.
|
void |
setTearDownOperation(DatabaseOperation tearDownOperation)
Sets the DatabaseOperation to call when ending the test.
|
String |
toString() |
assertNotNull, assertNotNull, assertNotNullNorEmpty, assertTrue, assertTrue, fail
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getConnection
public AbstractDatabaseTester()
public AbstractDatabaseTester(String schema)
schema
- The schema to be tested. Can be null
public void closeConnection(IDatabaseConnection connection) throws Exception
IDatabaseTester
closeConnection
in interface IDatabaseTester
Exception
public IDataSet getDataSet()
IDatabaseTester
getDataSet
in interface IDatabaseTester
public void onSetup() throws Exception
IDatabaseTester
onSetup
in interface IDatabaseTester
Exception
public void onTearDown() throws Exception
IDatabaseTester
onTearDown
in interface IDatabaseTester
Exception
public void setDataSet(IDataSet dataSet)
IDatabaseTester
setDataSet
in interface IDatabaseTester
public void setSchema(String schema)
IDatabaseTester
setSchema
in interface IDatabaseTester
public void setSetUpOperation(DatabaseOperation setUpOperation)
IDatabaseTester
setSetUpOperation
in interface IDatabaseTester
public void setTearDownOperation(DatabaseOperation tearDownOperation)
IDatabaseTester
setTearDownOperation
in interface IDatabaseTester
protected String getSchema()
protected DatabaseOperation getSetUpOperation()
protected DatabaseOperation getTearDownOperation()
public void setOperationListener(IOperationListener operationListener)
setOperationListener
in interface IDatabaseTester
operationListener
- The operation listener that is invoked on
specific events in the IDatabaseTester
.Copyright © 2002-2016. All Rights Reserved.