net.jqwik.api.lifecycle.Lifespan Maven / Gradle / Ivy
The newest version!
package net.jqwik.api.lifecycle;
import org.apiguardian.api.*;
import net.jqwik.api.*;
import static org.apiguardian.api.API.Status.*;
/**
* Define how long a resource,
* e.g. the value in a {@linkplain Store} with the same identifier,
* will live:
*
*
* - For the whole test run
* - For the currently running property
* - For the currently running try
*
*
* Any hook or collection of hooks can use this enum to allow the specification
* of the lifespan of resources from which it is abstracting.
*
* @see Store
*/
@API(status = EXPERIMENTAL, since = "1.2.4")
public enum Lifespan {
/**
* Live for the whole test run
*/
RUN,
/**
* Live until the currently running property is finished
*/
PROPERTY,
/**
* Live for a single try
*/
TRY
}