Polishing

This commit is contained in:
Juergen Hoeller
2014-04-30 00:01:07 +02:00
parent 58adc150c9
commit 02aca9c754
4 changed files with 31 additions and 32 deletions

View File

@@ -89,21 +89,22 @@ public class TestContextManager {
/**
* Construct a new {@code TestContextManager} for the specified {@linkplain Class
* test class} and automatically {@link #registerTestExecutionListeners register} the
* Construct a new {@code TestContextManager} for the specified {@linkplain Class test class}
* and automatically {@link #registerTestExecutionListeners register} the
* {@link TestExecutionListener TestExecutionListeners} configured for the test class
* via the {@link TestExecutionListeners @TestExecutionListeners} annotation.
* @param testClass the test class to be managed
* @see #registerTestExecutionListeners(List)
* @see #registerTestExecutionListeners
*/
public TestContextManager(Class<?> testClass) {
CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate = new DefaultCacheAwareContextLoaderDelegate(contextCache);
BootstrapContext bootstrapContext = new DefaultBootstrapContext(testClass, cacheAwareContextLoaderDelegate);
this.testContextBootstrapper = BootstrapUtils.resolveTestContextBootstrapper(bootstrapContext);
this.testContext = new DefaultTestContext(testContextBootstrapper);
registerTestExecutionListeners(testContextBootstrapper.getTestExecutionListeners());
this.testContext = new DefaultTestContext(this.testContextBootstrapper);
registerTestExecutionListeners(this.testContextBootstrapper.getTestExecutionListeners());
}
/**
* Get the {@link TestContext} managed by this {@code TestContextManager}.
*/