Java 类org.testng.internal.ObjectFactoryImpl 实例源码

项目:activejpa    文件:BaseModelTest.java   
@ObjectFactory
public IObjectFactory getObjectFactory(ITestContext context) throws Exception {
    Class<?> clazz = Class.forName("org.activejpa.enhancer.ActiveJpaAgentLoaderImpl");
    Method method = clazz.getMethod("loadAgent");
    method.invoke(null);
    return new ObjectFactoryImpl();
}
项目:minnal    文件:BaseJPAResourceTest.java   
/**
 * Note: Kind of hack to ensure that ActiveJPAAgent instruments all the models before they are loaded.
 *
 * @param context
 * @return
 * @throws Exception
 */
@ObjectFactory
public IObjectFactory getObjectFactory(ITestContext context) throws Exception {
    ActiveJpaAgentLoader.instance().loadAgent();
    return new ObjectFactoryImpl();
}