Class EnsuredCall
- All Implemented Interfaces:
Call,CallDecorator<SceneCall>
A class to provide a construct to "ensure" a specific state checked by target call.
Each element in ensurers is performed first, then target is performed.
This procedure is repeated until:
- Both an element from
ensurersand thetargetare successfully performed. - Either an element from
ensureror thetargetthrows a non-recoverable exception.
target should be a call to an action, which succeeds when and only when the state you want to ensure is satisfied.
Each element in ensurers should be an action that tries to make the state meet your expectation.
The ensurers should be sorted by an ascending order of their execution cost.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface jp.co.moneyforward.autotest.framework.action.CallDecorator
CallDecorator.Base<C extends Call> -
Constructor Summary
ConstructorsConstructorDescriptionEnsuredCall(SceneCall target, List<SceneCall> ensurers, ResolverBundle resolverBundle) Creates an object of this class. -
Method Summary
Modifier and TypeMethodDescriptionensurers()Returns "ensurer" calls.com.github.dakusui.actionunit.core.ActiontoAction(ActionComposer actionComposer) Converts this call to action to an action object.Methods inherited from class jp.co.moneyforward.autotest.framework.action.CallDecorator.Base
targetCall
-
Constructor Details
-
EnsuredCall
Creates an object of this class.- Parameters:
target- A target class to be decorated.
-
-
Method Details
-
toAction
Description copied from interface:CallConverts this call to action to an action object.
This is an
Node#acceptmethod in the Visitor pattern. Usually implementations of this method should call back byactionComposer#create(this)to make a double dispatch happen.Each value in the
ongoingResolverBundleis a function that resolves a value of a variable designated by a corresponding key.- Parameters:
actionComposer- A visitor, which creates an action from this object.- Returns:
- An action created by
actionComposer.
-
ensurers
-