net.sourceforge.groboutils.autodoc.v1.testserver.junit
Class JUnitTestListener

java.lang.Object
  extended bynet.sourceforge.groboutils.autodoc.v1.testserver.TestCorrelate
      extended bynet.sourceforge.groboutils.autodoc.v1.testserver.junit.JUnitTestListener
All Implemented Interfaces:
junit.framework.TestListener
Direct Known Subclasses:
ITFJUnitListener

public abstract class JUnitTestListener
extends TestCorrelate
implements junit.framework.TestListener

A helper class to interface between the test framework and JUnit's TestListener interface.

Since:
March 17, 2002
Version:
$Date: 2003/06/10 01:08:41 $
Author:
Matt Albrecht groboclown@users.sourceforge.net

Constructor Summary
JUnitTestListener(MonitorFinder finder)
           
 
Method Summary
protected abstract  void addError(TestData data, java.lang.Throwable t)
          Called when the test in the data has an unexpected exception thrown.
 void addError(junit.framework.Test test, java.lang.Throwable t)
          An error occurred.
 void addFailure(junit.framework.Test test, junit.framework.AssertionFailedError t)
          A failure occurred.
protected abstract  void addFailure(TestData data, junit.framework.AssertionFailedError t)
          Called when the test in the data has an assertion error.
protected  TestInfo createTestInfo(junit.framework.Test test)
          Creates a JUnitTestInfo instance.
 void endTest(junit.framework.Test test)
          A test ended.
protected abstract  void endTest(TestData data)
          Called after the test ends.
 void startTest(junit.framework.Test test)
          A test started.
protected abstract  void startTest(TestData data)
          Called before the test starts, and after the test has been registered.
 
Methods inherited from class net.sourceforge.groboutils.autodoc.v1.testserver.TestCorrelate
createTestInfo, createTestInfoFromStack, findClassMethodFromStack, getFinder, getOwner, getOwnerName, getTestData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JUnitTestListener

public JUnitTestListener(MonitorFinder finder)
Method Detail

startTest

protected abstract void startTest(TestData data)
Called before the test starts, and after the test has been registered.


endTest

protected abstract void endTest(TestData data)
Called after the test ends. The implemented method must not send off the data - that is done by the JUnitTestListener implementation.


addError

protected abstract void addError(TestData data,
                                 java.lang.Throwable t)
Called when the test in the data has an unexpected exception thrown.


addFailure

protected abstract void addFailure(TestData data,
                                   junit.framework.AssertionFailedError t)
Called when the test in the data has an assertion error.


addError

public void addError(junit.framework.Test test,
                     java.lang.Throwable t)
An error occurred.

Specified by:
addError in interface junit.framework.TestListener

addFailure

public void addFailure(junit.framework.Test test,
                       junit.framework.AssertionFailedError t)
A failure occurred.

Specified by:
addFailure in interface junit.framework.TestListener

endTest

public void endTest(junit.framework.Test test)
A test ended.

Specified by:
endTest in interface junit.framework.TestListener

startTest

public void startTest(junit.framework.Test test)
A test started.

Specified by:
startTest in interface junit.framework.TestListener

createTestInfo

protected TestInfo createTestInfo(junit.framework.Test test)
Creates a JUnitTestInfo instance.



Copyright © 2001-2003 by The GroboUtils Project