public abstract static class Action.JustTransform<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 |
---|
JustTransform() |
Modifier and Type | Method and Description |
---|---|
abstract S |
transform(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>