public abstract static class Action.JustMutate<S> extends java.lang.Object implements Action.Independent<S>
If you rather want to declaratively specify an action start with Action.just(Transformer), Action.when(Predicate) or Action.builder().
For actions whose state transformation depends on the state, you have to implement either Action.Dependent or Action.Independent.
Action.Dependent<S>, Action.Independent<S>, Action.JustMutate<S>, Action.JustTransform<S>
Constructor and Description |
---|
JustMutate() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
description() |
abstract void |
mutate(S state) |
Arbitrary<Transformer<S>> |
transformer()
Return an arbitrary for transformers that does not depend on the previous state.
|
public Arbitrary<Transformer<S>> transformer()
Action.Independent
In addition to performing a state transformation the transforming function can also check or assert post-conditions and invariants that should hold when doing the transformation.
transformer
in interface Action.Independent<S>
public abstract void mutate(S state)
public java.lang.String description()