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 anCallobject 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 anAssertionCallobject which executesact, then validates it usingassertions.static RetryCallReturns a call that retries a givencall.static SceneCallsceneToSceneCall(Scene scene, String variableStoreName) Returns aCallobject for a givenscene.static SceneCallsceneToSceneCall(Scene scene, String outputVariableStoreName, ResolverBundle resolverBundle) Returns aCallobject for a givenscene.static AutotestSupportReturns 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
Callobject for a givenscene.This method internally calls
new SceneCall(Scene, String, ResolverBundle). AResolverBundleis created fromscene.inputVariableNames()andscene.outputVariableNames().- Parameters:
scene- A scene for which a call is created.variableStoreName- A name of a variable store in which thesceneis performed. variables are resolved in the variable store specified by this parameter.- Returns:
- A created
SceneCallobject. - See Also:
-
sceneToSceneCall
public static SceneCall sceneToSceneCall(Scene scene, String outputVariableStoreName, ResolverBundle resolverBundle) Returns a
Callobject for a givenscene.A
resolverBundleis 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 ofscenewrite there output variables.resolverBundle- A resolver bundle which gives values of variables during the execution of the returned scene call.- Returns:
- A
SceneCallobject forscene.
-
actCall
public static <T,R> ActCall<T,R> actCall(String outputVariableName, Act<T, R> act, String inputVariableName) Returns anCallobject for a givenact.- Type Parameters:
T- Input type ofact.R- Output type ofact.- Parameters:
outputVariableName- A name of an output variable, to whichactwrites its output to.act- Anact, for which a call is created.inputVariableName- A name of variable from which anacttakes its input.- Returns:
- An
ActCallobject.
-
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 anAssertionCallobject 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 fromactis stored.act- Anactwhose output should be validated.assertions- A list of functions each of which creates aStatementthat validates an output fromact.inputVariableName- A name of a variable, whose value is given toact.- Returns:
- An
AssertionCallobject. - 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 whichcallshould be retried.interval- Interval between tries.- Returns:
- A call that retries a given
call.
-