Java 类org.testng.ISuiteListener 实例源码

项目:TestNG-Foundation    文件:ListenerChain.java   
/**
 * [ISuiteListener]
 * This method is invoked before the SuiteRunner starts.
 * 
 * @param suite current test suite
 */
@Override
public void onStart(ISuite suite) {
    suite.setAttribute(LISTENER_CHAIN, this);

    synchronized(suiteListeners) {
        for (ISuiteListener suiteListener : Lists.reverse(suiteListeners)) {
            suiteListener.onStart(suite);
        }
    }
}
项目:TestNG-Foundation    文件:ListenerChain.java   
/**
 * [ISuiteListener]
 * This method is invoked after the SuiteRunner has run all
 * the test suites.
 * 
 * @param suite current test suite
 */
@Override
public void onFinish(ISuite suite) {
    synchronized(suiteListeners) {
        for (ISuiteListener suiteListener : suiteListeners) {
            suiteListener.onFinish(suite);
        }
    }
}
项目:Reer    文件:TestNGListenerAdapterFactory.java   
private ITestListener createProxy(Class<?> configListenerClass, final ITestListener listener) {
    Class<?>[] interfaces = new Class<?>[]{ITestListener.class, ISuiteListener.class, configListenerClass};
    return (ITestListener) Proxy.newProxyInstance(classLoader, interfaces, new AdaptedListener(listener));
}