spring-framework / org.springframework.test.context.junit.jupiter / SpringExtension / getApplicationContext

getApplicationContext

open static fun getApplicationContext(context: ExtensionContext): ApplicationContext

Get the ApplicationContext associated with the supplied ExtensionContext.

Parameters

context - the current ExtensionContext (never null)

Exceptions

IllegalStateException - if an error occurs while retrieving the application context

Return
the application context

See Also
org.springframework.test.context.TestContext#getApplicationContext()