TestInstancePostProcessor
defines the API for Extensions
that wish to post-process test instances.
Common use cases include injecting dependencies into the test instance, invoking custom initialization methods on the test instance, etc.
Extensions that implement TestInstancePostProcessor
must be
registered at the class level.
Consult the documentation in Extension
for details on
constructor requirements.
postProcessTestInstance(Object, ExtensionContext)
, TestInstancePreDestroyCallback
, TestInstanceFactory
, ParameterResolver
Modifier and Type | Method and Description |
---|---|
public void | postProcessTestInstance(Object
the instance to post-process; never testInstance, ExtensionContext null the current extension context; never context)null Callback for post-processing the supplied test instance. |
postProcessTestInstance | back to summary |
---|---|
public void postProcessTestInstance(Object testInstance, ExtensionContext context) throws Exception Callback for post-processing the supplied test instance. Note the
|