接口 ApplicationContextAssertProvider<C extends ApplicationContext>

类型参数:
C - the application context type
所有超级接口:
ApplicationContext, ApplicationEventPublisher, org.assertj.core.api.AssertProvider<ApplicationContextAssert<C>>, AutoCloseable, BeanFactory, Closeable, EnvironmentCapable, HierarchicalBeanFactory, ListableBeanFactory, MessageSource, ResourceLoader, ResourcePatternResolver
所有已知子接口:
AssertableApplicationContext, AssertableReactiveWebApplicationContext, AssertableWebApplicationContext

public interface ApplicationContextAssertProvider<C extends ApplicationContext> extends ApplicationContext, org.assertj.core.api.AssertProvider<ApplicationContextAssert<C>>, Closeable
An ApplicationContext that additionally supports AssertJ style assertions. Can be used to decorate an existing application context or an application context that failed to start.

Assertions can be applied using the standard AssertJ assertThat(...) style (see ApplicationContextAssert for a complete list). For example:

 assertThat(applicationContext).hasSingleBean(MyBean.class);
 

If the original ApplicationContext is needed for any reason the getSourceApplicationContext() method can be used.

Any ApplicationContext method called on a context that has failed to start will throw an IllegalStateException.

从以下版本开始:
2.0.0
作者:
Phillip Webb
另请参阅: