Test Instance Pre-construct Callback

This version is still in development and not considered stable yet.
For the latest stable release, please see JUnit 6.0.1!

TestInstancePreConstructCallback defines the API for Extensions that wish to be invoked prior to test instances being constructed (by a constructor call or via TestInstanceFactory).

This extension provides a symmetric call to TestInstancePreDestroyCallback and is useful in combination with other extensions to prepare constructor parameters or keeping track of test instances and their lifecycle.

Accessing the test-scoped ExtensionContext

You may override the getTestInstantiationExtensionContextScope(…​) method to return TEST_METHOD to make test-specific data available to your extension implementation or if you want to keep state on the test method level.