类的使用
org.springframework.boot.test.context.assertj.ApplicationContextAssert
使用ApplicationContextAssert的程序包
-
org.springframework.boot.test.context.assertj中ApplicationContextAssert的使用
修饰符和类型方法说明ApplicationContextAssertProvider.assertThat()
已过时。to prevent accidental use.ApplicationContextAssert.doesNotHaveBean
(Class<?> type) Verifies that the application context (or ancestors) does not contain any beans of the given type.ApplicationContextAssert.doesNotHaveBean
(Class<?> type, ApplicationContextAssert.Scope scope) Verifies that the application context does not contain any beans of the given type.ApplicationContextAssert.doesNotHaveBean
(String name) Verifies that the application context does not contain a beans of the given name.Verifies that the application context contains a bean with the given name.ApplicationContextAssert.hasFailed()
Verifies that the application has failed to start.ApplicationContextAssert.hasNotFailed()
Verifies that the application has not failed to start.ApplicationContextAssert.hasSingleBean
(Class<?> type) Verifies that the application context (or ancestors) contains a single bean with the given type.ApplicationContextAssert.hasSingleBean
(Class<?> type, ApplicationContextAssert.Scope scope) Verifies that the application context contains a single bean with the given type.