Class AssertionCall<R>
java.lang.Object
jp.co.moneyforward.autotest.framework.action.CallDecorator.Base<ActCall<?,R>>
jp.co.moneyforward.autotest.framework.action.AssertionCall<R>
- Type Parameters:
R- Type of value to be validated by assertions.
- All Implemented Interfaces:
Call,CallDecorator<ActCall<?,R>>
A call for assertions.
Both for input and output variable name, this uses assertion:{target().outputVariableName()}.
-
Nested Class Summary
Nested classes/interfaces inherited from interface jp.co.moneyforward.autotest.framework.action.CallDecorator
CallDecorator.Base<C extends Call> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a list of act calls, which are converted from assertions represented as a list ofFunction<R, Statement<R>>.Returns a name of a variable that holds the output oftargetCall().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
-
AssertionCall
public AssertionCall(ActCall<?, R> target, List<Function<R, com.github.valid8j.pcond.fluent.Statement<R>>> assertions) Creates an object of this class.- Parameters:
target- An act call to be verified by this call.assertions- A list of functions that return verifying statements for the outputtarget.
-
-
Method Details
-
outputVariableName
Returns a name of a variable that holds the output oftargetCall().- Returns:
- A name of a variable that holds the output of
targetCall().
-
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.
-
assertionsAsActCalls
Returns a list of act calls, which are converted from assertions represented as a list ofFunction<R, Statement<R>>. Each act call in the list reads the value to be verified from variable specified byoutputVariableName().- Returns:
- A list of act calls.
-