本文整理汇总了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();
}
示例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();
}
示例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();
}
示例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;
}
示例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;
}
示例6: setUpSpringContext
import org.springframework.test.context.TestContextManager; //导入方法依赖的package包/类
@Before
public void setUpSpringContext() throws Exception {
TestContextManager testContextManager = new TestContextManager(getClass());
testContextManager.prepareTestInstance(this);
}