|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.unitils.core.TestListener
org.unitils.TracingTestListener
public class TracingTestListener
Test listener that records all method invocations.
| Nested Class Summary | |
|---|---|
static class |
TracingTestListener.Call
|
static interface |
TracingTestListener.Invocation
|
static class |
TracingTestListener.InvocationSource
|
static class |
TracingTestListener.ListenerInvocation
|
static class |
TracingTestListener.TestFramework
|
static class |
TracingTestListener.TestInvocation
|
| Constructor Summary | |
|---|---|
TracingTestListener()
|
|
| Method Summary | |
|---|---|
void |
afterCreateTestObject(Object testObject)
Invoked before any of the test in a test class are run. |
void |
afterTestMethod(Object testObject,
Method testMethod,
Throwable throwable)
Invoked after the test run but before the test tear down (e.g. |
void |
afterTestTearDown(Object testObject,
Method testMethod)
Invoked after the test tear down (eg @After). |
void |
beforeTestClass(Class<?> testClass)
Invoked before the generic class setup (e.g. |
void |
beforeTestMethod(Object testObject,
Method testMethod)
Invoked before the test but after the test setup (eg @Before) is run. |
void |
beforeTestSetUp(Object testObject,
Method testMethod)
Invoked before the test setup (eg @Before) is run. |
void |
expectExceptionInMethod(TracingTestListener.Invocation exceptionMethod,
boolean throwAssertionFailedError)
|
List<TracingTestListener.Call> |
getCallList()
|
String |
getCallListAsString()
|
Throwable |
getCurrentThrowable()
|
void |
registerListenerInvocation(TracingTestListener.ListenerInvocation listenerInvocation,
Class<?> testClass,
Object test,
Method testMethod,
Throwable throwable)
|
void |
registerTestInvocation(TracingTestListener.TestInvocation invocation,
Class<?> testClass,
String methodName)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TracingTestListener()
| Method Detail |
|---|
public List<TracingTestListener.Call> getCallList()
public String getCallListAsString()
public void expectExceptionInMethod(TracingTestListener.Invocation exceptionMethod,
boolean throwAssertionFailedError)
public void registerTestInvocation(TracingTestListener.TestInvocation invocation,
Class<?> testClass,
String methodName)
public void registerListenerInvocation(TracingTestListener.ListenerInvocation listenerInvocation,
Class<?> testClass,
Object test,
Method testMethod,
Throwable throwable)
public void beforeTestClass(Class<?> testClass)
TestListener
beforeTestClass in class TestListenertestClass - The class whose test methods are about to be executed, not nullpublic void afterCreateTestObject(Object testObject)
TestListener
afterCreateTestObject in class TestListenertestObject - The test class, not null
public void beforeTestSetUp(Object testObject,
Method testMethod)
TestListener
beforeTestSetUp in class TestListenertestObject - The test instance, not nulltestMethod - The test method, not null
public void beforeTestMethod(Object testObject,
Method testMethod)
TestListener
beforeTestMethod in class TestListenertestObject - The test instance, not nulltestMethod - The test method, not null
public void afterTestMethod(Object testObject,
Method testMethod,
Throwable throwable)
TestListener
afterTestMethod in class TestListenertestObject - The test instance, not nulltestMethod - The test method, not nullthrowable - The throwable thrown during the test or beforeTestMethod, null if none was thrown
public void afterTestTearDown(Object testObject,
Method testMethod)
TestListener
afterTestTearDown in class TestListenertestObject - The test instance, not nulltestMethod - The test method, not nullpublic Throwable getCurrentThrowable()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||