Package net.jqwik.api.lifecycle
Schnittstelle PerProperty.Lifecycle
- Umschließende Klasse:
PerProperty
public static interface PerProperty.Lifecycle
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungdefault void
after
(PropertyExecutionResult propertyExecutionResult) Override if you want to perform some work once after the annotated property (or example).default void
before
(PropertyLifecycleContext context) Override if you want to perform some work once before the annotated property (or example).default PropertyExecutionResult
onFailure
(PropertyExecutionResult propertyExecutionResult) Override if you want to perform some work or run assertions if - and only if - the property failed.default void
Override if you want to perform some work or run assertions if - and only if - the property succeeded.resolve
(ParameterResolutionContext parameterContext) Override if you want to provide parameters for this property.
-
Methodendetails
-
resolve
default Optional<ResolveParameterHook.ParameterSupplier> resolve(ParameterResolutionContext parameterContext) Override if you want to provide parameters for this property.- Parameter:
parameterContext
- The object to retrieve information about the parameter to resolve- Gibt zurück:
- a supplier wrapped in
Optional.of()
-
before
Override if you want to perform some work once before the annotated property (or example).- Parameter:
context
- The object to retrieve information about the current property
-
after
Override if you want to perform some work once after the annotated property (or example).- Parameter:
propertyExecutionResult
- The object to retrieve information about the property's execution result
-
onSuccess
default void onSuccess()Override if you want to perform some work or run assertions if - and only if - the property succeeded. If you want to make the property fail just use an appropriate assertion methods or throw an exception. -
onFailure
Override if you want to perform some work or run assertions if - and only if - the property failed. You have to return the originalpropertyExecutionResult
or transform it into another result.- Parameter:
propertyExecutionResult
- The object that represents the property's execution result
-