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


构造方法摘要
protected JMockitModule.JMockitTestListener()
           
 
方法摘要
 void afterClass(Object testObject)
          Invoked after the test class tear down (eg @AfterClass).
 void beforeMethod(Object testObject, Method testMethod)
          Invoked before the test setup (eg @Before) is run.
protected  String getName()
          监听器名称
 
从类 org.test4j.module.core.TestListener 继承的方法
afterMethod, afterRunned, beforeClass, beforeRunning, toString
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

构造方法详细信息

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 null
testMethod - 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.