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>>

public final class AssertionCall<R> extends CallDecorator.Base<ActCall<?,R>>

A call for assertions.

Both for input and output variable name, this uses assertion:{target().outputVariableName()}.

  • 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 output target.
  • Method Details

    • outputVariableName

      public String outputVariableName()
      Returns a name of a variable that holds the output of targetCall().
      Returns:
      A name of a variable that holds the output of targetCall().
    • toAction

      public com.github.dakusui.actionunit.core.Action toAction(ActionComposer actionComposer)
      Description copied from interface: Call

      Converts this call to action to an action object.

      This is an Node#accept method in the Visitor pattern. Usually implementations of this method should call back by actionComposer#create(this) to make a double dispatch happen.

      Each value in the ongoingResolverBundle is 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

      public List<ActCall<R,R>> assertionsAsActCalls()
      Returns a list of act calls, which are converted from assertions represented as a list of Function<R, Statement<R>>. Each act call in the list reads the value to be verified from variable specified by outputVariableName().
      Returns:
      A list of act calls.