Enum Class Lifespan

java.lang.Object
java.lang.Enum<Lifespan>
net.jqwik.api.lifecycle.Lifespan
All Implemented Interfaces:
Serializable, Comparable<Lifespan>, Constable

@API(status=EXPERIMENTAL, since="1.2.4") public enum Lifespan extends Enum<Lifespan>
Define how long a resource, e.g. the value in a 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 Also:
  • Enum Constant Details

    • RUN

      public static final Lifespan RUN
      Live for the whole test run
    • PROPERTY

      public static final Lifespan PROPERTY
      Live until the currently running property is finished
    • TRY

      public static final Lifespan TRY
      Live for a single try
  • Method Details

    • values

      public static Lifespan[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Lifespan valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null