ApplicationContextAssert

open class ApplicationContextAssert<C : ApplicationContext?> : AbstractAssert<SELF, ACTUAL>

AssertJ assertions that can be applied to an ApplicationContext.

Author

Phillip Webb

Andy Wilkinson

Since

2.0.0

Parameters

<C>

the application context type

See also

Types

Link copied to clipboard
enum Scope
The scope of an assertion.

Properties

Link copied to clipboard
open var info: WritableAssertionInfo

Functions

Link copied to clipboard
open fun as(description: String, args: Array<Any>): SELF
Link copied to clipboard
open fun <ASSERT : AbstractAssert<out Any, out Any>?> asInstanceOf(instanceOfAssertFactory: InstanceOfAssertFactory<out Any, ASSERT>): ASSERT
Link copied to clipboard
open fun asList(): AbstractListAssert<out Any, List<out Any>, Any, ObjectAssert<Any>>
Link copied to clipboard
open fun asString(): AbstractStringAssert<out Any>
abstract fun asString(): AbstractCharSequenceAssert<out Any, String>
Link copied to clipboard
open fun describedAs(description: Description): SELF
Link copied to clipboard
Link copied to clipboard
open fun doesNotHave(condition: Condition<in ACTUAL>): SELF
Link copied to clipboard
Verifies that the application context (or ancestors) does not contain any beans of the given type.
Verifies that the application context does not contain a beans of the given name.
Verifies that the application context does not contain any beans of the given type.
Link copied to clipboard
open fun doesNotHaveSameClassAs(other: Any): SELF
Link copied to clipboard
open fun doesNotHaveSameHashCodeAs(other: Any): SELF
Link copied to clipboard
open fun doesNotHaveToString(otherToString: String): SELF
Link copied to clipboard
open fun equals(obj: Any): Boolean
Link copied to clipboard
open fun <T> getBean(type: Class<T>): AbstractObjectAssert<out Any, T>
Obtain a single bean of the given type from the application context (or ancestors), the bean becoming the object under test.
open fun getBean(name: String): AbstractObjectAssert<out Any, Any>
Obtain a single bean of the given name from the application context, the bean becoming the object under test.
open fun <T> getBean(type: Class<T>, scope: ApplicationContextAssert.Scope): AbstractObjectAssert<out Any, T>
Obtain a single bean of the given type from the application context, the bean becoming the object under test.
open fun <T> getBean(name: String, type: Class<T>): AbstractObjectAssert<out Any, T>
Obtain a single bean of the given name and type from the application context, the bean becoming the object under test.
Link copied to clipboard
open fun <T> getBeanNames(type: Class<T>): AbstractObjectArrayAssert<out Any, String>
Obtain the beans names of the given type from the application context, the names becoming the object array under test.
Link copied to clipboard
open fun <T> getBeans(type: Class<T>): MapAssert<String, T>
Obtain a map bean names and instances of the given type from the application context (or ancestors), the map becoming the object under test.
open fun <T> getBeans(type: Class<T>, scope: ApplicationContextAssert.Scope): MapAssert<String, T>
Obtain a map bean names and instances of the given type from the application context, the map becoming the object under test.
Link copied to clipboard
open fun getFailure(): AbstractThrowableAssert<out Any, out Throwable>
Obtain the failure that stopped the application context from running, the failure becoming the object under test.
Link copied to clipboard
open fun getWritableAssertionInfo(): WritableAssertionInfo
Link copied to clipboard
open fun has(condition: Condition<in ACTUAL>): SELF
Link copied to clipboard
Verifies that the application context contains a bean with the given name.
Link copied to clipboard
Verifies that the application has failed to start.
Link copied to clipboard
open fun hashCode(): Int
Link copied to clipboard
Verifies that the application has not failed to start.
Link copied to clipboard
open fun hasSameClassAs(other: Any): SELF
Link copied to clipboard
open fun hasSameHashCodeAs(other: Any): SELF
Link copied to clipboard
Verifies that the application context (or ancestors) contains a single bean with the given type.
Verifies that the application context contains a single bean with the given type.
Link copied to clipboard
open fun hasToString(expectedToString: String): SELF
Link copied to clipboard
open fun is(condition: Condition<in ACTUAL>): SELF
Link copied to clipboard
open fun isEqualTo(expected: Any): SELF
Link copied to clipboard
open fun isExactlyInstanceOf(type: Class<out Any>): SELF
Link copied to clipboard
open fun isIn(values: Array<Any>): SELF
Link copied to clipboard
open fun isInstanceOf(type: Class<out Any>): SELF
Link copied to clipboard
open fun isInstanceOfAny(types: Array<Class<out Any>>): SELF
Link copied to clipboard
open fun <T> isInstanceOfSatisfying(type: Class<T>, requirements: Consumer<T>): SELF
Link copied to clipboard
open fun isNot(condition: Condition<in ACTUAL>): SELF
Link copied to clipboard
open fun isNotEqualTo(other: Any): SELF
Link copied to clipboard
open fun isNotExactlyInstanceOf(type: Class<out Any>): SELF
Link copied to clipboard
open fun isNotIn(values: Array<Any>): SELF
Link copied to clipboard
open fun isNotInstanceOf(type: Class<out Any>): SELF
Link copied to clipboard
open fun isNotInstanceOfAny(types: Array<Class<out Any>>): SELF
Link copied to clipboard
open fun isNotNull(): SELF
Link copied to clipboard
open fun isNotOfAnyClassIn(types: Array<Class<out Any>>): SELF
Link copied to clipboard
open fun isNotSameAs(other: Any): SELF
Link copied to clipboard
open fun isNull()
Link copied to clipboard
open fun isOfAnyClassIn(types: Array<Class<out Any>>): SELF
Link copied to clipboard
open fun isSameAs(expected: Any): SELF
Link copied to clipboard
open fun matches(predicate: Predicate<in ACTUAL>): SELF
Link copied to clipboard
open fun overridingErrorMessage(newErrorMessage: String, args: Array<Any>): SELF
Link copied to clipboard
open fun satisfies(condition: Condition<in ACTUAL>): SELF
Link copied to clipboard
fun satisfiesAnyOf(assertions: Array<Consumer<in ACTUAL>>): SELF
Link copied to clipboard
open fun setCustomRepresentation(customRepresentation: Representation)
Link copied to clipboard
open fun setDescriptionConsumer(descriptionConsumer: Consumer<Description>)
Link copied to clipboard
open fun setPrintAssertionsDescription(printAssertionsDescription: Boolean)
Link copied to clipboard
open fun usingComparator(customComparator: Comparator<in ACTUAL>): SELF
Link copied to clipboard
open fun usingDefaultComparator(): SELF
Link copied to clipboard
open fun withFailMessage(newErrorMessage: String, args: Array<Any>): SELF
Link copied to clipboard
open fun withRepresentation(representation: Representation): SELF
Link copied to clipboard
open fun withThreadDumpOnError(): SELF