org.unitils
Class TracingTestListener
java.lang.Object
org.unitils.core.TestListener
org.unitils.TracingTestListener
public class TracingTestListener
- extends TestListener
Test listener that records all method invocations.
- Author:
- Tim Ducheyne, Filip Neven
|
Method Summary |
void |
afterCreateTestObject(Object testObject)
|
void |
afterTestMethod(Object testObject,
Method testMethod,
Throwable throwable)
|
void |
afterTestTearDown(Object testObject,
Method testMethod)
|
void |
beforeTestClass(Class<?> testClass)
|
void |
beforeTestMethod(Object testObject,
Method testMethod)
|
void |
beforeTestSetUp(Object testObject,
Method testMethod)
|
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)
|
boolean |
shouldInvokeTestMethod(Object testObject,
Method testMethod)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TracingTestListener
public TracingTestListener(TestListener delegate)
TracingTestListener
public TracingTestListener()
getCallList
public List<TracingTestListener.Call> getCallList()
getCallListAsString
public String getCallListAsString()
expectExceptionInMethod
public void expectExceptionInMethod(TracingTestListener.Invocation exceptionMethod,
boolean throwAssertionFailedError)
registerTestInvocation
public void registerTestInvocation(TracingTestListener.TestInvocation invocation,
Class<?> testClass,
String methodName)
registerListenerInvocation
public void registerListenerInvocation(TracingTestListener.ListenerInvocation listenerInvocation,
Class<?> testClass,
Object test,
Method testMethod,
Throwable throwable)
beforeTestClass
public void beforeTestClass(Class<?> testClass)
- Overrides:
beforeTestClass in class TestListener
afterCreateTestObject
public void afterCreateTestObject(Object testObject)
- Overrides:
afterCreateTestObject in class TestListener
beforeTestSetUp
public void beforeTestSetUp(Object testObject,
Method testMethod)
- Overrides:
beforeTestSetUp in class TestListener
beforeTestMethod
public void beforeTestMethod(Object testObject,
Method testMethod)
- Overrides:
beforeTestMethod in class TestListener
afterTestMethod
public void afterTestMethod(Object testObject,
Method testMethod,
Throwable throwable)
- Overrides:
afterTestMethod in class TestListener
afterTestTearDown
public void afterTestTearDown(Object testObject,
Method testMethod)
- Overrides:
afterTestTearDown in class TestListener
shouldInvokeTestMethod
public boolean shouldInvokeTestMethod(Object testObject,
Method testMethod)
- Overrides:
shouldInvokeTestMethod in class TestListener
getCurrentThrowable
public Throwable getCurrentThrowable()
Copyright © 2014. All Rights Reserved.