Polish TestContextManager
This commit is contained in:
parent
0cb22fc8f3
commit
dc345dcb3d
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2014 the original author or authors.
|
* Copyright 2002-2015 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -83,8 +83,6 @@ public class TestContextManager {
|
||||||
|
|
||||||
private final TestContext testContext;
|
private final TestContext testContext;
|
||||||
|
|
||||||
private final TestContextBootstrapper testContextBootstrapper;
|
|
||||||
|
|
||||||
private final List<TestExecutionListener> testExecutionListeners = new ArrayList<TestExecutionListener>();
|
private final List<TestExecutionListener> testExecutionListeners = new ArrayList<TestExecutionListener>();
|
||||||
|
|
||||||
|
|
||||||
|
@ -99,12 +97,11 @@ public class TestContextManager {
|
||||||
public TestContextManager(Class<?> testClass) {
|
public TestContextManager(Class<?> testClass) {
|
||||||
CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate = new DefaultCacheAwareContextLoaderDelegate(contextCache);
|
CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate = new DefaultCacheAwareContextLoaderDelegate(contextCache);
|
||||||
BootstrapContext bootstrapContext = new DefaultBootstrapContext(testClass, cacheAwareContextLoaderDelegate);
|
BootstrapContext bootstrapContext = new DefaultBootstrapContext(testClass, cacheAwareContextLoaderDelegate);
|
||||||
this.testContextBootstrapper = BootstrapUtils.resolveTestContextBootstrapper(bootstrapContext);
|
TestContextBootstrapper testContextBootstrapper = BootstrapUtils.resolveTestContextBootstrapper(bootstrapContext);
|
||||||
this.testContext = new DefaultTestContext(this.testContextBootstrapper);
|
this.testContext = new DefaultTestContext(testContextBootstrapper);
|
||||||
registerTestExecutionListeners(this.testContextBootstrapper.getTestExecutionListeners());
|
registerTestExecutionListeners(testContextBootstrapper.getTestExecutionListeners());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the {@link TestContext} managed by this {@code TestContextManager}.
|
* Get the {@link TestContext} managed by this {@code TestContextManager}.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue