|
|
@ -100,7 +100,7 @@ public abstract class AbstractApplicationContextRunner<SELF extends AbstractAppl
|
|
|
|
|
|
|
|
|
|
|
|
private final Supplier<C> contextFactory;
|
|
|
|
private final Supplier<C> contextFactory;
|
|
|
|
|
|
|
|
|
|
|
|
private final List<ApplicationContextInitializer<C>> initializers;
|
|
|
|
private final List<ApplicationContextInitializer<? super C>> initializers;
|
|
|
|
|
|
|
|
|
|
|
|
private final TestPropertyValues environmentProperties;
|
|
|
|
private final TestPropertyValues environmentProperties;
|
|
|
|
|
|
|
|
|
|
|
@ -132,7 +132,7 @@ public abstract class AbstractApplicationContextRunner<SELF extends AbstractAppl
|
|
|
|
* @param configurations the configuration
|
|
|
|
* @param configurations the configuration
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
protected AbstractApplicationContextRunner(Supplier<C> contextFactory,
|
|
|
|
protected AbstractApplicationContextRunner(Supplier<C> contextFactory,
|
|
|
|
List<ApplicationContextInitializer<C>> initializers,
|
|
|
|
List<ApplicationContextInitializer<? super C>> initializers,
|
|
|
|
TestPropertyValues environmentProperties, TestPropertyValues systemProperties,
|
|
|
|
TestPropertyValues environmentProperties, TestPropertyValues systemProperties,
|
|
|
|
ClassLoader classLoader, ApplicationContext parent,
|
|
|
|
ClassLoader classLoader, ApplicationContext parent,
|
|
|
|
List<Configurations> configurations) {
|
|
|
|
List<Configurations> configurations) {
|
|
|
@ -156,7 +156,8 @@ public abstract class AbstractApplicationContextRunner<SELF extends AbstractAppl
|
|
|
|
* @param initializer the initializer to add
|
|
|
|
* @param initializer the initializer to add
|
|
|
|
* @return a new instance with the updated initializers
|
|
|
|
* @return a new instance with the updated initializers
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public SELF withInitializer(ApplicationContextInitializer<C> initializer) {
|
|
|
|
public SELF withInitializer(
|
|
|
|
|
|
|
|
ApplicationContextInitializer<? super ConfigurableApplicationContext> initializer) {
|
|
|
|
Assert.notNull(initializer, "Initializer must not be null");
|
|
|
|
Assert.notNull(initializer, "Initializer must not be null");
|
|
|
|
return newInstance(this.contextFactory, add(this.initializers, initializer),
|
|
|
|
return newInstance(this.contextFactory, add(this.initializers, initializer),
|
|
|
|
this.environmentProperties, this.systemProperties, this.classLoader,
|
|
|
|
this.environmentProperties, this.systemProperties, this.classLoader,
|
|
|
@ -259,7 +260,7 @@ public abstract class AbstractApplicationContextRunner<SELF extends AbstractAppl
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected abstract SELF newInstance(Supplier<C> contextFactory,
|
|
|
|
protected abstract SELF newInstance(Supplier<C> contextFactory,
|
|
|
|
List<ApplicationContextInitializer<C>> initializers,
|
|
|
|
List<ApplicationContextInitializer<? super C>> initializers,
|
|
|
|
TestPropertyValues environmentProperties, TestPropertyValues systemProperties,
|
|
|
|
TestPropertyValues environmentProperties, TestPropertyValues systemProperties,
|
|
|
|
ClassLoader classLoader, ApplicationContext parent,
|
|
|
|
ClassLoader classLoader, ApplicationContext parent,
|
|
|
|
List<Configurations> configurations);
|
|
|
|
List<Configurations> configurations);
|
|
|
|