|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dbunit.AbstractDatabaseTester
public abstract class AbstractDatabaseTester
Basic implementation of IDatabaseTester.
Implementations of IDatabaseTester may use this class as a starting point.
| Nested Class Summary | |
|---|---|
static class |
AbstractDatabaseTester.AssertionFailedError
Exception used to avoid JUnit dependency. |
| Constructor Summary | |
|---|---|
AbstractDatabaseTester()
|
|
| Method Summary | |
|---|---|
protected void |
assertNotNullNorEmpty(java.lang.String propertyName,
java.lang.String property)
Asserts that propertyName is not a null String and has a length greater than zero. |
protected void |
assertTrue(java.lang.String message,
boolean condition)
Method used to avoid JUnit dependency |
void |
closeConnection(IDatabaseConnection connection)
Close the specified connection. |
IDataSet |
getDataSet()
Returns the test dataset. |
protected java.lang.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 |
setSchema(java.lang.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. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.dbunit.IDatabaseTester |
|---|
getConnection |
| Constructor Detail |
|---|
public AbstractDatabaseTester()
| Method Detail |
|---|
public void closeConnection(IDatabaseConnection connection)
throws java.lang.Exception
IDatabaseTester
closeConnection in interface IDatabaseTesterjava.lang.Exceptionpublic IDataSet getDataSet()
IDatabaseTester
getDataSet in interface IDatabaseTester
public void onSetup()
throws java.lang.Exception
IDatabaseTester
onSetup in interface IDatabaseTesterjava.lang.Exception
public void onTearDown()
throws java.lang.Exception
IDatabaseTester
onTearDown in interface IDatabaseTesterjava.lang.Exceptionpublic void setDataSet(IDataSet dataSet)
IDatabaseTester
setDataSet in interface IDatabaseTesterpublic void setSchema(java.lang.String schema)
IDatabaseTester
setSchema in interface IDatabaseTesterpublic void setSetUpOperation(DatabaseOperation setUpOperation)
IDatabaseTester
setSetUpOperation in interface IDatabaseTesterpublic void setTearDownOperation(DatabaseOperation tearDownOperation)
IDatabaseTester
setTearDownOperation in interface IDatabaseTester
protected void assertNotNullNorEmpty(java.lang.String propertyName,
java.lang.String property)
protected void assertTrue(java.lang.String message,
boolean condition)
message - message displayed if assertion is falsecondition - condition to be testedprotected java.lang.String getSchema()
protected DatabaseOperation getSetUpOperation()
protected DatabaseOperation getTearDownOperation()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||