public class ApplicationContextRunner extends AbstractApplicationContextRunner<ApplicationContextRunner,ConfigurableApplicationContext,AssertableApplicationContext>
ApplicationContext runner
for a standard,
non-web environment ConfigurableApplicationContext
.
See AbstractApplicationContextRunner
for details.
AbstractApplicationContextRunner.BeanRegistration<T>
Constructor and Description |
---|
ApplicationContextRunner()
Create a new
ApplicationContextRunner instance using an
AnnotationConfigApplicationContext as the underlying source. |
ApplicationContextRunner(Supplier<ConfigurableApplicationContext> contextFactory)
Create a new
ApplicationContextRunner instance using the specified
contextFactory as the underlying source. |
Modifier and Type | Method and Description |
---|---|
protected ApplicationContextRunner |
newInstance(Supplier<ConfigurableApplicationContext> contextFactory,
List<ApplicationContextInitializer<? super ConfigurableApplicationContext>> initializers,
TestPropertyValues environmentProperties,
TestPropertyValues systemProperties,
ClassLoader classLoader,
ApplicationContext parent,
List<AbstractApplicationContextRunner.BeanRegistration<?>> beanRegistrations,
List<Configurations> configurations) |
run, with, withBean, withBean, withBean, withBean, withClassLoader, withConfiguration, withInitializer, withParent, withPropertyValues, withSystemProperties, withUserConfiguration
public ApplicationContextRunner()
ApplicationContextRunner
instance using an
AnnotationConfigApplicationContext
as the underlying source.public ApplicationContextRunner(Supplier<ConfigurableApplicationContext> contextFactory)
ApplicationContextRunner
instance using the specified
contextFactory
as the underlying source.contextFactory
- a supplier that returns a new instance on each callprotected ApplicationContextRunner newInstance(Supplier<ConfigurableApplicationContext> contextFactory, List<ApplicationContextInitializer<? super ConfigurableApplicationContext>> initializers, TestPropertyValues environmentProperties, TestPropertyValues systemProperties, ClassLoader classLoader, ApplicationContext parent, List<AbstractApplicationContextRunner.BeanRegistration<?>> beanRegistrations, List<Configurations> configurations)
Copyright © 2019 Pivotal Software, Inc.. All rights reserved.