|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
net.sourceforge.sqlunit.SQLUnit
public class SQLUnit
The SQLUnit class is actually a JUnit test case and is the main program which is called by the SQLUnit user. Instead of executing predefined tests in sequence, the SQLUnit test will parse an XML input file containing the test information and execute tests dynamically.
Constructor Summary | |
---|---|
SQLUnit(java.lang.String name)
Instantiates a new instance of SQLUnit. |
Method Summary | |
---|---|
void |
runTest()
Called by Test.run() or Test.runBare() from the SQLUnit task. |
void |
setAntSymbols(java.util.Hashtable projectProps)
Sets any symbols that were set for SQLUnit within the Ant build.xml file, if SQLUnit is invoked using the SQLUnit Ant task. |
void |
setConnection(java.sql.Connection conn)
Allows a client other than the sqlunit build task to set the database connection to use for the test. |
void |
setDebug(boolean debug)
Sets the debug attribute from the SQLUnit task. |
void |
setHaltOnFailure(boolean haltOnFailure)
Sets the haltOnFailure attribute from the SQLUnit task. |
void |
setReporter(IReporter reporter)
Sets the IReporter object from the SQLUnit task. |
void |
setTestFile(java.lang.String testFile)
Sets the testFile attribute from the SQLUnit task. |
static junit.framework.Test |
suite()
Returns the TestSuite object to run. |
void |
testWrapper()
The main testing class which dynamically processes the input XML file. |
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, name, run, run, runBare, setName, setUp, tearDown, toString |
Methods inherited from class junit.framework.Assert |
---|
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SQLUnit(java.lang.String name)
name
- the name of the TestCase object.Method Detail |
---|
public static junit.framework.Test suite()
public final void setHaltOnFailure(boolean haltOnFailure)
haltOnFailure
- controls the behavior of the test. If true,
the test will stop processing the first time a test fails. If
false, the test will continue on till all files declared in
the sqlunit task is consumed.public final void setDebug(boolean debug)
debug
- prints trace information using log4j if set to true.public final void setReporter(IReporter reporter)
reporter
- the IReporter object to log messages to.public final void setTestFile(java.lang.String testFile)
testFile
- the test file to use for the test.public final void setConnection(java.sql.Connection conn)
conn
- the database connection to use.public final void setAntSymbols(java.util.Hashtable projectProps)
projectProps
- a Hashtable of Ant properties set in the calling
build.xml file.public final void runTest() throws SQLUnitException
runTest
in class junit.framework.TestCase
SQLUnitException
- if one is thrown by the test.public final void testWrapper() throws SQLUnitException
SQLUnitException
- if one is thrown by underlying methods.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |