Schnittstelle PerProperty.Lifecycle

Umschließende Klasse:
PerProperty

public static interface PerProperty.Lifecycle
  • Methodendetails

    • resolve

      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

      default void before(PropertyLifecycleContext context)
      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

      default void after(PropertyExecutionResult propertyExecutionResult)
      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

      default PropertyExecutionResult onFailure(PropertyExecutionResult propertyExecutionResult)
      Override if you want to perform some work or run assertions if - and only if - the property failed. You have to return the original propertyExecutionResult or transform it into another result.
      Parameter:
      propertyExecutionResult - The object that represents the property's execution result