Interface ActionComposer
An interface that models a factory of actions.
This interface is designed to be a "visitor" of "calls", each of which represents a call of an action (ActionFactory).
A call is a model of an occurrence of an action, and it has input and output.
Calls can be categorized into two.
Calls for scenes (Scene) and calls for acts (Act).
Corresponding to the subclasses of Act, there are subcategories of it, which are LeafAct, AssertionAct, and PipelinedAct.
In this interface, there are create(XyzCall xyzCall, Map<String, Function<Context, Object>> assignmentResolversFromCurrentCall) methods defined.
assignmentResolversFromCurrentCall is a map from a variable name to a function which resolves its value from the
ongoing context object.
By relying on this object for resolving variable values referenced inside Act objects (, which are held by Calls), we can define Act objects
work in different variable spaces without changing code (transparent to variable space name, which is determined by a call's object name).
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault com.github.dakusui.actionunit.core.Actiondefault com.github.dakusui.actionunit.core.Actioncreate(AssertionCall<?> call) default com.github.dakusui.actionunit.core.Actioncreate(EnsuredCall ensuredCall) default com.github.dakusui.actionunit.core.Actiondefault com.github.dakusui.actionunit.core.ActionCreates an action for a givenSceneCallobject.static ActionComposercreateActionComposer(ExecutionEnvironment executionEnvironment) Returns an execution environment in which actions created by this composer objects are performed.Returns currently ongoingSceneCallobject.
-
Field Details
-
LOGGER
static final org.slf4j.Logger LOGGERA logger object
-
-
Method Details
-
ongoingSceneCall
SceneCall ongoingSceneCall()Returns currently ongoingSceneCallobject.- Returns:
- Currently ongoing
SceneCallobject.
-
executionEnvironment
ExecutionEnvironment executionEnvironment()Returns an execution environment in which actions created by this composer objects are performed.- Returns:
- An execution environment.
-
ongoingWorkingVariableStoreNames
-
create
Creates an action for a givenSceneCallobject.- Parameters:
sceneCall- A scene call from which an action should be created.- Returns:
- A sequential action created from
sceneCall.
-
create
-
create
-
create
-
create
-
createActionComposer
-