@API(status=EXPERIMENTAL,
since="1.6.0")
@FunctionalInterface
public interface ProvidePropertyInstanceHook
extends LifecycleHook
This hook can only be used in simple cases, since parameter resolution is currently unavailable to implementors.
Caveat: Only one hook per property method is possible.
| Modifier and Type | Field and Description |
|---|---|
static ProvidePropertyInstanceHook |
DEFAULT |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
provide(java.lang.Class<?> containerClass)
Create the test instance for running a property or example.
|
appliesTo, propagateTostatic final ProvidePropertyInstanceHook DEFAULT
java.lang.Object provide(java.lang.Class<?> containerClass)
throws java.lang.Throwable
This method will be called exactly once per property. All tries share the same instance!
containerClass - The container class which runs the testcontainerClassjava.lang.Throwable