Class TestListenerWrapper
- java.lang.Object
-
- org.apache.tools.ant.taskdefs.optional.junit.TestListenerWrapper
-
- All Implemented Interfaces:
junit.framework.TestListener,IgnoredTestListener
public class TestListenerWrapper extends java.lang.Object implements junit.framework.TestListener, IgnoredTestListener
-
-
Constructor Summary
Constructors Constructor Description TestListenerWrapper(junit.framework.TestListener listener)
-
Method Summary
Modifier and Type Method Description voidaddError(junit.framework.Test test, java.lang.Throwable throwable)voidaddFailure(junit.framework.Test test, junit.framework.AssertionFailedError assertionFailedError)voidendTest(junit.framework.Test test)voidstartTest(junit.framework.Test test)voidtestAssumptionFailure(junit.framework.Test test, java.lang.Throwable throwable)Receive a report that a test has failed an assumption.voidtestIgnored(junit.framework.Test test)Reports when a test has been marked with the @Ignore annotation.
-
-
-
Method Detail
-
addError
public void addError(junit.framework.Test test, java.lang.Throwable throwable)- Specified by:
addErrorin interfacejunit.framework.TestListener
-
addFailure
public void addFailure(junit.framework.Test test, junit.framework.AssertionFailedError assertionFailedError)- Specified by:
addFailurein interfacejunit.framework.TestListener
-
endTest
public void endTest(junit.framework.Test test)
- Specified by:
endTestin interfacejunit.framework.TestListener
-
startTest
public void startTest(junit.framework.Test test)
- Specified by:
startTestin interfacejunit.framework.TestListener
-
testIgnored
public void testIgnored(junit.framework.Test test)
Description copied from interface:IgnoredTestListenerReports when a test has been marked with the @Ignore annotation. The parameter should normally be typed to JUnit'sJUnit4TestCaseFacadeso implementing classes should be able to get the details of the ignore by casting the argument and retrieving the descriptor from the test.- Specified by:
testIgnoredin interfaceIgnoredTestListener- Parameters:
test- the details of the test and failure that have triggered this report.
-
testAssumptionFailure
public void testAssumptionFailure(junit.framework.Test test, java.lang.Throwable throwable)Description copied from interface:IgnoredTestListenerReceive a report that a test has failed an assumption. Within JUnit4 this is normally treated as a test being skipped, although how any listener handles this is up to that specific listener.Note: Tests that throw assumption failures will still report the endTest method, which may differ from how the addError and addFailure methods work, it's up for any implementing classes to handle this.
- Specified by:
testAssumptionFailurein interfaceIgnoredTestListener- Parameters:
test- the details of the test and failure that have triggered this report.throwable- the AssumptionViolatedException thrown from the current assumption failure.
-
-