org.test4j.module.jmockit
类 JMockitModule.JMockitTestListener
java.lang.Object
org.test4j.module.core.TestListener
org.test4j.module.jmockit.JMockitModule.JMockitTestListener
- 包容类:
- JMockitModule
protected class JMockitModule.JMockitTestListener
- extends TestListener
JMockitModule.JMockitTestListener
protected JMockitModule.JMockitTestListener()
beforeMethod
public void beforeMethod(Object testObject,
Method testMethod)
- Invoked before the test setup (eg @Before) is run. This can be overridden
to for example initialize the test-fixture.
Phase
o setupClass (Object testObject)
o beforeMethod (Object testObject, Method testMethod)
o beforeMethodRunning (Object testObject, Method testMethod)
o afterMethodRunned (Object testObject, Method testMethod, Throwable
testThrowable)
o afterMethod (Object testObject, Method testMethod)
o teardownClass (Object testObject)
jmockit-0.999.9 bug fixed:
测试类在 mockit.integration.testng.internal.TestNGRunnerDecorator 方法
run(IHookCallBack callBack, ITestResult testResult) ->
executeTestMethod(IHookCallBack callBack, ITestResult testResult) ->
cleanUpAfterTestMethodExecution() ->
ExecutingTest..void finishExecution()中将全局的 nonStrictMocks
列表清空,导致后续的Expectations()出错
- 覆盖:
- 类
TestListener 中的 beforeMethod
- 参数:
testObject - The test instance, not nulltestMethod - The test method, not null
afterClass
public void afterClass(Object testObject)
- 从类
TestListener 复制的描述
- Invoked after the test class tear down (eg @AfterClass).
Phase
o setupClass (Object testObject)
o beforeMethod (Object testObject, Method testMethod)
o beforeMethodRunning (Object testObject, Method testMethod)
o afterMethodRunned (Object testObject, Method testMethod, Throwable
testThrowable)
o afterMethod (Object testObject, Method testMethod)
o teardownClass (Object testObject)
- 覆盖:
- 类
TestListener 中的 afterClass
getName
protected String getName()
- 从类
TestListener 复制的描述
- 监听器名称
- 指定者:
- 类
TestListener 中的 getName
- 返回:
Copyright © 2013. All rights reserved.