Class SceneCall

java.lang.Object
jp.co.moneyforward.autotest.framework.action.SceneCall
All Implemented Interfaces:
Call, WithOid

public final class SceneCall extends Object implements Call, WithOid
A class to model a "call" to a Scene.
  • Constructor Details

    • SceneCall

      public SceneCall(Scene scene, ResolverBundle resolverBundle, String outputVariableStoreName)

      Creates an instance of this class.

      outputVariableStoreName specifies a name of a context variable (actionunit), to which the output of scene is written.

      resolverBundle is used to compute input variable values.

      Parameters:
      scene - A scene to be performed by this call.
      resolverBundle - A bundle of resolvers.
      outputVariableStoreName - A name of variable store, to which the scene writes its output.
  • Method Details

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

      Specified by:
      toAction in interface Call
      Parameters:
      actionComposer - A visitor, which creates an action from this object.
      Returns:
      An action created by actionComposer.
    • oid

      public String oid()
      Returns an object identifier of this object.
      Specified by:
      oid in interface WithOid
      Returns:
      An object identifier of this object.
    • targetScene

      public Scene targetScene()
      Returns a Scene object targeted by this call.
      Returns:
      A Scene object.
    • outputVariableStoreName

      public String outputVariableStoreName()
      A name of "output" variable store, where this SceneCall writes its final result at the end of execution.
      Returns:
      A name of variable store, which this SceneCall writes its result to.
    • resolverBundle

      public ResolverBundle resolverBundle()
      Returns a bundle of variable resolvers of this object.
      Returns:
      A bundle of variable resolvers.
    • workingVariableStore

      public Map<String,Object> workingVariableStore(com.github.dakusui.actionunit.core.Context context)
      Returns currently ongoing working variable store.
      Parameters:
      context - A context in which this call is being executed.
      Returns:
      A currently ongoing working variable store.
    • begin

      public com.github.dakusui.actionunit.core.Action begin(List<String> ongoingWorkingVariableStoreNames)

      Returns an action, which marks the beginning of a sequence of main actions.

      The action copies a map of the InsDog's framework variables for this scene call to a context variable whose name is computed by workingVariableStoreNameFor(this.targetScene().oid()).

      Returns:
      An action, which marks the beginning of a sequence of main actions.
    • end

      public com.github.dakusui.actionunit.core.Action end(List<String> ongoingWorkingVariableStoreNames)

      Returns an action, which marks an ending of a sequence of main actions.

      The action copies to a map of the InsDog's framework variables for this scene call from a context variable whose name is computed by workingVariableStoreNameFor(this.targetScene().oid()).

      Returns:
      An action, which marks an ending of a sequence of main actions.