Package net.jqwik.api.stateful
Interface ActionSequence<M>
- Type Parameters:
M
- The type of the model
@API(status=MAINTAINED,
since="1.0")
public interface ActionSequence<M>
A sequence of Actions that can be run with a model of type
M
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionPeek into the model of a running sequence.runState()
int
size()
withInvariant
(String label, Invariant<M> invariant) Add a labelled invariant to a sequence.default ActionSequence<M>
withInvariant
(Invariant<M> invariant) Add an unlabelled invariant to a sequence.
-
Method Details
-
runActions
-
run
-
size
@API(status=EXPERIMENTAL, since="1.3.3") int size() -
withInvariant
Add an unlabelled invariant to a sequence.- Parameters:
invariant
- will be checked after each successful invocation of run(Object)- Returns:
- the same sequence instance
- See Also:
-
withInvariant
@API(status=MAINTAINED, since="1.4.0") ActionSequence<M> withInvariant(@Nullable String label, Invariant<M> invariant) Add a labelled invariant to a sequence.- Parameters:
label
- will show up in error messages when the invariant failsinvariant
- will be checked after each successful invocation of run(Object)- Returns:
- the same sequence instance
- See Also:
-
finalModel
M finalModel() -
runState
ActionSequence.RunState runState() -
peek
Peek into the model of a running sequence. ThemodelPeeker
will be called after each successful invocation of run(Object) but before checking invariants.- Parameters:
modelPeeker
-- Returns:
- the same sequence instance
-