Enum Class AutotestSupport
- All Implemented Interfaces:
Serializable
,Comparable<AutotestSupport>
,Constable
A facade class of the "autotest" framework.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T,
R> ActCall <T, R> Returns anCall
object for a givenact
.static <T,
R> AssertionCall <R> assertionCall
(String outputVariableName, Act<T, R> act, List<Function<R, com.github.valid8j.pcond.fluent.Statement<R>>> assertions, String inputVariableName) Creates anAssertionCall
object which executesact
, then validates it usingassertions
.static RetryCall
Returns a call that retries a givencall
.static SceneCall
sceneToSceneCall
(Scene scene, String variableStoreName) Returns aCall
object for a givenscene
.static SceneCall
sceneToSceneCall
(Scene scene, String outputVariableStoreName, ResolverBundle resolverBundle) Returns aCall
object for a givenscene
.static AutotestSupport
Returns the enum constant of this class with the specified name.static AutotestSupport[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
sceneToSceneCall
Returns a
Call
object for a givenscene
.This method internally calls
new SceneCall(Scene, String, ResolverBundle)
. AResolverBundle
is created fromscene.inputVariableDisplayNames()
andscene.outputVariableNames()
.- Parameters:
scene
- A scene for which a call is created.variableStoreName
- A name of a variable store in which thescene
is performed. variables are resolved in the variable store specified by this parameter.- Returns:
- A created
SceneCall
object. - See Also:
-
sceneToSceneCall
public static SceneCall sceneToSceneCall(Scene scene, String outputVariableStoreName, ResolverBundle resolverBundle) Returns a
Call
object for a givenscene
.A
resolverBundle
is responsible for figuring out values of input and output variables ofscene
. The working area is usually specified byoutputVariableStoreName
. Note, it isoutputVariableStoreName
.- Parameters:
scene
- A scene for which a call is createdoutputVariableStoreName
- A name of variable store, where the children ofscene
write there output variables.resolverBundle
- A resolver bundle which gives values of variables during the execution of the returned scene call.- Returns:
- A
SceneCall
object forscene
.
-
actCall
public static <T,R> ActCall<T,R> actCall(String outputVariableName, Act<T, R> act, String inputVariableName) Returns anCall
object for a givenact
. The returned call performs theact
by passing a variable specified byinputVariableName
. Also, the call assigns the output of theact
to the givenoutputVariableName
except whenact
is aSink
. If it is aSink
, it will discard it by assigning it to a dummy variableScene.DUMMY_OUTPUT_VARIABLE_NAME
.- Type Parameters:
T
- Input type ofact
.R
- Output type ofact
.- Parameters:
outputVariableName
- A name of an output variable, to whichact
writes its output to.act
- Anact
, for which a call is created.inputVariableName
- A name of variable from which anact
takes its input.- Returns:
- An
ActCall
object.
-
assertionCall
public static <T,R> AssertionCall<R> assertionCall(String outputVariableName, Act<T, R> act, List<Function<R, com.github.valid8j.pcond.fluent.Statement<R>>> assertions, String inputVariableName) Creates anAssertionCall
object which executesact
, then validates it usingassertions
. An output from act will be stored in a context withoutputVariableName
.- Type Parameters:
T
- Type of the input toact
.R
- Type of the output fromact
.- Parameters:
outputVariableName
- A name of a variable, where an output fromact
is stored.act
- Anact
whose output should be validated.assertions
- A list of functions each of which creates aStatement
that validates an output fromact
.inputVariableName
- A name of a variable, whose value is given toact
.- Returns:
- An
AssertionCall
object. - See Also:
-
retryCall
public static RetryCall retryCall(Call call, int times, Class<? extends Throwable> onException, int interval) Returns a call that retries a givencall
.- Parameters:
call
- A call to be retried on a failure.times
- Number of retried to be attempted.onException
- An exception class on whichcall
should be retried.interval
- Interval between tries.- Returns:
- A call that retries a given
call
.
-