Package org.apache.ant.antunit.junit3
Class JUnitNotificationAdapter
- java.lang.Object
-
- org.apache.ant.antunit.junit3.JUnitNotificationAdapter
-
- All Implemented Interfaces:
AntUnitExecutionNotifier
class JUnitNotificationAdapter extends java.lang.Object implements AntUnitExecutionNotifier
Adapt AntUnitExecutionNotifier events into JUnit3 TestResult events
-
-
Field Summary
Fields Modifier and Type Field Description private junit.framework.TestResult
junitTestResult
private java.util.Map
testByTarget
-
Constructor Summary
Constructors Constructor Description JUnitNotificationAdapter(junit.framework.TestResult testResult, java.util.Enumeration tests)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
fireEndTest(java.lang.String targetName)
invokes endTest on all registered test listeners.void
fireError(java.lang.String targetName, java.lang.Throwable t)
invokes addError on all registered test listeners.void
fireFail(java.lang.String targetName, AssertionFailedException ae)
invokes addFailure on all registered test listeners.void
fireStartTest(java.lang.String targetName)
invokes start on all registered test listeners.
-
-
-
Method Detail
-
fireStartTest
public void fireStartTest(java.lang.String targetName)
Description copied from interface:AntUnitExecutionNotifier
invokes start on all registered test listeners.- Specified by:
fireStartTest
in interfaceAntUnitExecutionNotifier
- Parameters:
targetName
- the name of the target.
-
fireEndTest
public void fireEndTest(java.lang.String targetName)
Description copied from interface:AntUnitExecutionNotifier
invokes endTest on all registered test listeners.- Specified by:
fireEndTest
in interfaceAntUnitExecutionNotifier
- Parameters:
targetName
- the name of the current target.
-
fireError
public void fireError(java.lang.String targetName, java.lang.Throwable t)
Description copied from interface:AntUnitExecutionNotifier
invokes addError on all registered test listeners.- Specified by:
fireError
in interfaceAntUnitExecutionNotifier
- Parameters:
targetName
- the name of the failed target.t
- the associated Throwable.
-
fireFail
public void fireFail(java.lang.String targetName, AssertionFailedException ae)
Description copied from interface:AntUnitExecutionNotifier
invokes addFailure on all registered test listeners.- Specified by:
fireFail
in interfaceAntUnitExecutionNotifier
- Parameters:
targetName
- the name of the failed target.ae
- the associated AssertionFailedException.
-
-