doesNotHaveBean
Verifies that the application context (or ancestors) does not contain any beans of the given type.
Example:
assertThat(context).doesNotHaveBean(Foo.class);
Content copied to clipboard
Return
this
assertion object.
Parameters
type
the bean type
Throws
if the application context contains any beans of the giventype
open fun doesNotHaveBean(type: Class<out Any>, scope: ApplicationContextAssert.Scope): ApplicationContextAssert<C>
Verifies that the application context does not contain any beans of the given type.
Example:
assertThat(context).doesNotHaveBean(Foo.class, Scope.NO_ANCESTORS);
Content copied to clipboard
Return
this
assertion object.
Parameters
type
the bean type
scope
the scope of the assertion
Throws
if the application context contains any beans of the giventype
Verifies that the application context does not contain a beans of the given name.
Example:
assertThat(context).doesNotHaveBean("fooBean");
Content copied to clipboard
Return
this
assertion object.
Parameters
name
the name of the bean
Throws
if the application context contains a beans of the givenname