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 typeM
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classActionSequence.RunState
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description MfinalModel()ActionSequence<M>peek(java.util.function.Consumer<M> modelPeeker)Peek into the model of a running sequence.Mrun(M model)java.util.List<Action<M>>runActions()ActionSequence.RunStaterunState()intsize()ActionSequence<M>withInvariant(java.lang.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 Detail
-
size
@API(status=EXPERIMENTAL, since="1.3.3") int size()
-
withInvariant
default ActionSequence<M> withInvariant(Invariant<M> invariant)
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(String, Invariant)
-
withInvariant
@API(status=MAINTAINED, since="1.4.0") ActionSequence<M> withInvariant(java.lang.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:
withInvariant(Invariant)
-
finalModel
M finalModel()
-
runState
ActionSequence.RunState runState()
-
peek
@API(status=EXPERIMENTAL, since="1.2.5") ActionSequence<M> peek(java.util.function.Consumer<M> modelPeeker)Peek into the model of a running sequence. ThemodelPeekerwill be called after each successful invocation of run(Object) but before checking invariants.- Parameters:
modelPeeker-- Returns:
- the same sequence instance
-
-