类org.springframework.test.context.BootstrapTestUtils源码实例Demo

下面列出了怎么用org.springframework.test.context.BootstrapTestUtils的API类实例代码及写法,或者点击链接到github查看源代码。

MergedContextConfiguration buildMergedContextConfiguration(Class<?> testClass) {
	CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate = Mockito.mock(CacheAwareContextLoaderDelegate.class);
	BootstrapContext bootstrapContext = BootstrapTestUtils.buildBootstrapContext(testClass, cacheAwareContextLoaderDelegate);
	TestContextBootstrapper bootstrapper = BootstrapTestUtils.resolveTestContextBootstrapper(bootstrapContext);
	return bootstrapper.buildMergedContextConfiguration();
}
 
MergedContextConfiguration buildMergedContextConfiguration(Class<?> testClass) {
	CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate = Mockito.mock(CacheAwareContextLoaderDelegate.class);
	BootstrapContext bootstrapContext = BootstrapTestUtils.buildBootstrapContext(testClass, cacheAwareContextLoaderDelegate);
	TestContextBootstrapper bootstrapper = BootstrapTestUtils.resolveTestContextBootstrapper(bootstrapContext);
	return bootstrapper.buildMergedContextConfiguration();
}
 
MergedContextConfiguration buildMergedContextConfiguration(Class<?> testClass) {
	CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate = Mockito.mock(CacheAwareContextLoaderDelegate.class);
	BootstrapContext bootstrapContext = BootstrapTestUtils.buildBootstrapContext(testClass, cacheAwareContextLoaderDelegate);
	TestContextBootstrapper bootstrapper = BootstrapTestUtils.resolveTestContextBootstrapper(bootstrapContext);
	return bootstrapper.buildMergedContextConfiguration();
}
 
 类方法
 同包方法