枚举类的使用
org.springframework.boot.test.context.assertj.ApplicationContextAssert.Scope
-
org.springframework.boot.test.context.assertj中ApplicationContextAssert.Scope的使用
修饰符和类型方法说明返回带有指定名称的该类的枚举常量。static ApplicationContextAssert.Scope[]ApplicationContextAssert.Scope.values()返回包含该枚举类的常量的数组, 顺序与声明这些常量的顺序相同修饰符和类型方法说明ApplicationContextAssert.doesNotHaveBean(Class<?> type, ApplicationContextAssert.Scope scope) Verifies that the application context does not contain any beans of the given type.<T> org.assertj.core.api.AbstractObjectAssert<?, T> ApplicationContextAssert.getBean(Class<T> type, ApplicationContextAssert.Scope scope) Obtain a single bean of the given type from the application context, the bean becoming the object under test.<T> org.assertj.core.api.MapAssert<String, T> ApplicationContextAssert.getBeans(Class<T> type, ApplicationContextAssert.Scope scope) Obtain a map bean names and instances of the given type from the application context, the map becoming the object under test.ApplicationContextAssert.hasSingleBean(Class<?> type, ApplicationContextAssert.Scope scope) Verifies that the application context contains a single bean with the given type.