Interface AssertableApplicationContext
- All Superinterfaces:
org.springframework.context.ApplicationContext,ApplicationContextAssertProvider<org.springframework.context.ConfigurableApplicationContext>,org.springframework.context.ApplicationEventPublisher,org.assertj.core.api.AssertProvider<ApplicationContextAssert<org.springframework.context.ConfigurableApplicationContext>>,AutoCloseable,org.springframework.beans.factory.BeanFactory,Closeable,org.springframework.context.ConfigurableApplicationContext,org.springframework.core.env.EnvironmentCapable,org.springframework.beans.factory.HierarchicalBeanFactory,org.springframework.context.Lifecycle,org.springframework.beans.factory.ListableBeanFactory,org.springframework.context.MessageSource,org.springframework.core.io.ResourceLoader,org.springframework.core.io.support.ResourcePatternResolver
public interface AssertableApplicationContext extends ApplicationContextAssertProvider<org.springframework.context.ConfigurableApplicationContext>, org.springframework.context.ConfigurableApplicationContext
AnApplicationContextthat additionally supports AssertJ style assertions. Can be used to decorate an existing application context or an application context that failed to start.See
ApplicationContextAssertProviderfor more details.- Since:
- 2.0.0
- See Also:
ApplicationContextRunner,ApplicationContext
Method Summary
Static Methods Modifier and Type Method Description static AssertableApplicationContextget(Supplier<? extends org.springframework.context.ConfigurableApplicationContext> contextSupplier)Factory method to create a newAssertableApplicationContextinstance.Methods inherited from interface org.springframework.context.ApplicationContext
getApplicationName, getAutowireCapableBeanFactory, getDisplayName, getId, getParent, getStartupDate
Methods inherited from interface org.springframework.boot.test.context.assertj.ApplicationContextAssertProvider
assertThat, close, getSourceApplicationContext, getSourceApplicationContext, getStartupFailure
Methods inherited from interface org.springframework.context.ApplicationEventPublisher
publishEvent, publishEvent
Methods inherited from interface org.springframework.beans.factory.BeanFactory
containsBean, getAliases, getBean, getBean, getBean, getBean, getBean, getBeanProvider, getBeanProvider, getType, isPrototype, isSingleton, isTypeMatch, isTypeMatch
Methods inherited from interface org.springframework.context.ConfigurableApplicationContext
addApplicationListener, addBeanFactoryPostProcessor, addProtocolResolver, close, getBeanFactory, getEnvironment, isActive, refresh, registerShutdownHook, setEnvironment, setId, setParent
Methods inherited from interface org.springframework.beans.factory.HierarchicalBeanFactory
containsLocalBean, getParentBeanFactory
Methods inherited from interface org.springframework.beans.factory.ListableBeanFactory
containsBeanDefinition, findAnnotationOnBean, getBeanDefinitionCount, getBeanDefinitionNames, getBeanNamesForAnnotation, getBeanNamesForType, getBeanNamesForType, getBeanNamesForType, getBeansOfType, getBeansOfType, getBeansWithAnnotation
Methods inherited from interface org.springframework.context.MessageSource
getMessage, getMessage, getMessage
Method Detail
get
static AssertableApplicationContext get(Supplier<? extends org.springframework.context.ConfigurableApplicationContext> contextSupplier)
Factory method to create a newAssertableApplicationContextinstance.- Parameters:
contextSupplier- a supplier that will either return a fully configuredConfigurableApplicationContextor throw an exception if the context fails to start.- Returns:
- an
AssertableApplicationContextinstance