Package net.jqwik.api.sessions
Klasse JqwikSession
java.lang.Object
net.jqwik.api.sessions.JqwikSession
JqwikSession is the abstraction to give users of Arbitrary.sample()
and Arbitrary.sampleStream() outside the jqwik lifecycle
more control over the lifecycle.
This has also influence on memory heap usage since an un-finished session will
aggregate state, e.g. through caching and other stores.
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungstatic classstatic interface -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic voidfinish()static voidReturns the Random instance associated with the current session.static booleanisActive()static voidrun(String randomSeed, JqwikSession.Runnable runnable) Runs a given JqwikSession.Runnable in a new session with a given random seed.static voidrun(JqwikSession.Runnable runnable) static voidstart()static voidStarts a new session with a given random seed.
-
Konstruktordetails
-
JqwikSession
public JqwikSession()
-
-
Methodendetails
-
start
public static void start() -
isActive
public static boolean isActive() -
finish
public static void finish() -
finishTry
public static void finishTry() -
run
-
getRandom
Returns the Random instance associated with the current session.- Gibt zurück:
- a Random instance if a session is active, otherwise an empty Optional
-
start
Starts a new session with a given random seed. Currently seeds must be strings that can be parsed by Long.parseLong(String). -
run
@API(status=EXPERIMENTAL, since="1.9.1") public static void run(String randomSeed, JqwikSession.Runnable runnable) Runs a given JqwikSession.Runnable in a new session with a given random seed. Currently seeds must be strings that can be parsed by Long.parseLong(String).
-