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.Action
default com.github.dakusui.actionunit.core.Action
create
(AssertionCall<?> call) default com.github.dakusui.actionunit.core.Action
create
(EnsuredCall ensuredCall) default com.github.dakusui.actionunit.core.Action
default com.github.dakusui.actionunit.core.Action
Creates an action for a givenSceneCall
object.static ActionComposer
createActionComposer
(ExecutionEnvironment executionEnvironment) Returns an execution environment in which actions created by this composer objects are performed.Returns currently ongoingSceneCall
object.
-
Field Details
-
LOGGER
static final org.slf4j.Logger LOGGERA logger object
-
-
Method Details
-
ongoingSceneCall
SceneCall ongoingSceneCall()Returns currently ongoingSceneCall
object.- Returns:
- Currently ongoing
SceneCall
object.
-
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 givenSceneCall
object.- Parameters:
sceneCall
- A scene call from which an action should be created.- Returns:
- A sequential action created from
sceneCall
.
-
create
-
create
-
create
-
create
-
createActionComposer
-