net.sourceforge.sqlunit
Class SQLUnitResult

java.lang.Object
  extended by junit.framework.TestResult
      extended by net.sourceforge.sqlunit.SQLUnitResult

public class SQLUnitResult
extends junit.framework.TestResult

SQLUnitResult is a simple container which contains the cumulative results of a SQLUnit test run.

Version:
$Revision: 1.6 $
Author:
Sujit Pal (spal@users.sourceforge.net)

Field Summary
 
Fields inherited from class junit.framework.TestResult
fErrors, fFailures, fListeners, fRunTests
 
Constructor Summary
SQLUnitResult()
           
 
Method Summary
 void addErrorCount()
          Adds to the number of accumulated test errors.
 void addFailureCount()
          Adds to the number of accumulated test failures.
 void addRunCount()
          Adds to the number of accumulated tests performed.
 int errorCount()
          Returns the number of tests errored so far.
 int failureCount()
          Returns the number of tests failed so far.
 java.lang.Exception getLastException()
          Returns the last exception encountered in the test.
 java.lang.String getTestFile()
          Returns the test file name for the error report.
 int runCount()
          Returns the number of tests run so far.
 void setLastException(java.lang.Exception e)
          Sets the last exception encountered in the test.
 void setTestFile(java.lang.String testFile)
          Sets the test file for the report.
 void subtractRunCount()
          Subtracts the number of accumulated tests performed.
 java.lang.String toString()
          Returns a String representation of this object.
 boolean wasSuccessful()
          Returns true if the test was successful, false otherwise.
 
Methods inherited from class junit.framework.TestResult
addError, addFailure, addListener, endTest, errors, failures, removeListener, run, runProtected, runTests, shouldStop, startTest, stop, testErrors, testFailures
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SQLUnitResult

public SQLUnitResult()
Method Detail

addFailureCount

public final void addFailureCount()
Adds to the number of accumulated test failures.


addErrorCount

public final void addErrorCount()
Adds to the number of accumulated test errors.


addRunCount

public final void addRunCount()
Adds to the number of accumulated tests performed.


subtractRunCount

public final void subtractRunCount()
Subtracts the number of accumulated tests performed. This is done when a test is skipped.


runCount

public final int runCount()
Returns the number of tests run so far.

Overrides:
runCount in class junit.framework.TestResult
Returns:
the number of tests run so far.

failureCount

public final int failureCount()
Returns the number of tests failed so far.

Overrides:
failureCount in class junit.framework.TestResult
Returns:
the number of tests failed so far.

errorCount

public final int errorCount()
Returns the number of tests errored so far.

Overrides:
errorCount in class junit.framework.TestResult
Returns:
the number of tests errored so far.

getLastException

public final java.lang.Exception getLastException()
Returns the last exception encountered in the test.

Returns:
an Exception object representing the last exception encountered.

setLastException

public final void setLastException(java.lang.Exception e)
Sets the last exception encountered in the test.

Parameters:
e - an Exception object.

getTestFile

public final java.lang.String getTestFile()
Returns the test file name for the error report.

Returns:
the test file name for the error report.

setTestFile

public final void setTestFile(java.lang.String testFile)
Sets the test file for the report.

Parameters:
testFile - the test file to report.

wasSuccessful

public final boolean wasSuccessful()
Returns true if the test was successful, false otherwise.

Overrides:
wasSuccessful in class junit.framework.TestResult
Returns:
true if the test was successful, false otherwise.

toString

public final java.lang.String toString()
Returns a String representation of this object.

Overrides:
toString in class java.lang.Object
Returns:
a String representation.