|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.sqlunit.reporters.ReporterList
public class ReporterList
A IReporter that contains a list of other IReporters. Used to provide reporting to multiple places.
| Field Summary | |
|---|---|
static java.lang.String |
NAME
The name of the reporter. |
| Constructor Summary | |
|---|---|
ReporterList(int initialCapacity)
Constructs a new IReporterList. |
|
ReporterList(java.lang.String outputFile)
Always throws IllegalStateException since it is not real reporter; it is just a holder of other regular reporters. |
|
| Method Summary | |
|---|---|
void |
add(IReporter r)
Adds a new reporter to the reporter list. |
void |
addFailure(java.lang.Throwable t,
boolean isError)
Called when an exception is raised during test execution. |
void |
echo(java.lang.String message)
Prints the given the message to the reporter's output destination. |
void |
finishedTest(long elapsed,
boolean success)
Called when a test is finished. |
java.lang.String |
getName()
Returns the name of the reporter that will be used in Ant task. |
boolean |
hasContainer()
Returns true if the reporter is run in another context (container). |
java.util.Iterator |
iterator()
Returns an iterator over all reporters. |
void |
newTestFile(java.lang.String testName,
java.lang.String testFile)
Called when a new test file is entered. |
void |
runningTest(java.lang.String name,
int testIndex,
java.lang.String desc)
Called after the test is executed. |
void |
setConfig(java.util.Map configMap)
Called after the connection to the database is made. |
void |
settingUpConnection(java.lang.String connectionId)
Called before a new connection to a database is established. |
void |
setUp()
Called before the setup section of the test file. |
int |
size()
Returns the number of the reporters. |
void |
skippedTest(java.lang.String name,
int testIndex,
java.lang.String desc)
Called when the test is skipped. |
void |
tearDown()
Called before tearDown is executed. |
void |
tempFile(int testId,
java.lang.String result,
java.lang.String file)
Called when a test has failed and a temporary file is left containing data. |
void |
testFileComplete(boolean success)
Called when a test file is completed (when all tests in it are executed(. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String NAME
| Constructor Detail |
|---|
public ReporterList(java.lang.String outputFile)
outputFile - not usedpublic ReporterList(int initialCapacity)
initialCapacity - the initial capacity of the
reporter list.| Method Detail |
|---|
public boolean hasContainer()
false
SQLUnit engine will print to the reporter's logfile
the output from the Ant process.
hasContainer in interface IReportertruepublic java.lang.String getName()
getName in interface IReporterpublic void add(IReporter r)
r - the new reporter
public void newTestFile(java.lang.String testName,
java.lang.String testFile)
newTestFile in interface IReportertestName - the type of the testtestFile - the location of the rest filepublic void settingUpConnection(java.lang.String connectionId)
settingUpConnection in interface IReporterelConnection - the XML node describing the
connection as taken from the test filepublic void setConfig(java.util.Map configMap)
setConfig in interface IReporterconfigMap - contains configuration key-value pairs.public void setUp()
setUp in interface IReporter
public void runningTest(java.lang.String name,
int testIndex,
java.lang.String desc)
runningTest in interface IReporterelTest - the XML node describing the test
as taken from the test file.testIndex - the index of the test
public void finishedTest(long elapsed,
boolean success)
finishedTest in interface IReporterelTest - the XML node describing the test
as taken from the test fileelapsed - the time taken for the test to executesuccess - true if the test succeed;
false otherwise.
public void skippedTest(java.lang.String name,
int testIndex,
java.lang.String desc)
skippedTest in interface IReporterelTest - the XML node describing the test
as taken from the test filetestIndex - the index of the testreason - the reason why the test is skipped
public void addFailure(java.lang.Throwable t,
boolean isError)
addFailure in interface IReportert - the exception that is thrownisError - if true it is a test error
(cause not by the very test, but by an external factor);
if false it is a test failure (like a failed
assertion)public void tearDown()
tearDown in interface IReporter
public void tempFile(int testId,
java.lang.String result,
java.lang.String file)
tempFile in interface IReportertestId - the index of the testresult - the result of the testfile - the temporary filepublic void testFileComplete(boolean success)
testFileComplete in interface IReportersuccess - if true the test is successful;
if false it failedpublic void echo(java.lang.String message)
echo in interface IReportermessage - the message to be printedpublic int size()
public java.util.Iterator iterator()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||