当前位置: 首页>>代码示例>>Java>>正文


Java TestContextManager.prepareTestInstance方法代码示例

本文整理汇总了Java中org.springframework.test.context.TestContextManager.prepareTestInstance方法的典型用法代码示例。如果您正苦于以下问题:Java TestContextManager.prepareTestInstance方法的具体用法?Java TestContextManager.prepareTestInstance怎么用?Java TestContextManager.prepareTestInstance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.springframework.test.context.TestContextManager的用法示例。


在下文中一共展示了TestContextManager.prepareTestInstance方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setUp

import org.springframework.test.context.TestContextManager; //导入方法依赖的package包/类
@Before
public void setUp() throws Exception {
    testContextManager = new TestContextManager(getClass());
    testContextManager.prepareTestInstance(this);
    
    judgmentsServer.deleteByQuery("*:*");
    judgmentsServer.commit();
    
    indexJudgments();
}
 
开发者ID:CeON,项目名称:saos,代码行数:11,代码来源:JudgmentSearchServiceTest.java

示例2: setUp

import org.springframework.test.context.TestContextManager; //导入方法依赖的package包/类
@Before
public void setUp() throws Exception {
    testContextManager = new TestContextManager(getClass());
    testContextManager.prepareTestInstance(this);
    
    solrJudgmentsServer.deleteByQuery("*:*");
    solrJudgmentsServer.commit();
    
    indexJudgments();
}
 
开发者ID:CeON,项目名称:saos,代码行数:11,代码来源:JudgmentSearchServiceQueryParserTest.java

示例3: setUp

import org.springframework.test.context.TestContextManager; //导入方法依赖的package包/类
@Before
public void setUp() throws Exception {
    testContextManager = new TestContextManager(getClass());
    testContextManager.prepareTestInstance(this);
    
    solrJudgmentsServer.deleteByQuery("*:*");
    solrJudgmentsServer.commit();
}
 
开发者ID:CeON,项目名称:saos,代码行数:9,代码来源:JudgmentSearchServiceSortingTest.java

示例4: createTestContextManager

import org.springframework.test.context.TestContextManager; //导入方法依赖的package包/类
/**
 * Called reflectively by {@link #createTest()} to set up the Spring test context manager in the child
 * classloader.
 * 
 * @param testInstance - an instance of the class under test in the current ClassLoader
 * @return a new TestContextManager
 */
public static TestContextManager createTestContextManager(Object testInstance) {
	TestContextManager testContextManager = new TestContextManager(testInstance.getClass());
	try {
		testContextManager.prepareTestInstance(testInstance);
	} catch (Exception e) {
		throw new RuntimeException("Failed setting up Spring test instance", e);
	}
	return testContextManager;
}
 
开发者ID:lithiumtech,项目名称:multiverse-test,代码行数:17,代码来源:UnfinalizingSpringTestRunner.java

示例5: createTestContextManager

import org.springframework.test.context.TestContextManager; //导入方法依赖的package包/类
/**
 * Called reflectively by {@link #ensureInitialized()} to set up the Spring test context manager in the remote
 * classloader.
 * 
 * @param testInstance - an instance of the class under test in the current ClassLoader
 * @return a new TestContextManager
 */
private static TestContextManager createTestContextManager(Object testInstance) {
	TestContextManager testContextManager = new TestContextManager(testInstance.getClass());
	try {
		testContextManager.prepareTestInstance(testInstance);
	} catch (Exception e) {
		throw new ClassLoaderException("Failed setting up Spring test instance", e);
	}
	return testContextManager;
}
 
开发者ID:lithiumtech,项目名称:multiverse-test,代码行数:17,代码来源:FunctionalTestClassLoader.java

示例6: setUpSpringContext

import org.springframework.test.context.TestContextManager; //导入方法依赖的package包/类
@Before
public void setUpSpringContext() throws Exception {
    TestContextManager testContextManager = new TestContextManager(getClass());
    testContextManager.prepareTestInstance(this);
}
 
开发者ID:autoschool,项目名称:zlogger,代码行数:6,代码来源:CrudTest.java


注:本文中的org.springframework.test.context.TestContextManager.prepareTestInstance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。