Class ResolverBundle
java.lang.Object
java.util.AbstractMap<String, Function<com.github.dakusui.actionunit.core.Context, Object>>
java.util.HashMap<String, Function<com.github.dakusui.actionunit.core.Context, Object>>
jp.co.moneyforward.autotest.framework.action.ResolverBundle
- All Implemented Interfaces:
Serializable,Cloneable,Map<String, Function<com.github.dakusui.actionunit.core.Context, Object>>
public class ResolverBundle
extends HashMap<String, Function<com.github.dakusui.actionunit.core.Context, Object>>
A bundle of variable resolvers.
A variable resolver figures out a value of a variable specified by a variable name. This class bundles a set of such resolvers and associated each resolver with a variable name which the resolver should figure out the value.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Constructor Summary
ConstructorsConstructorDescriptionResolverBundle(List<Resolver> resolvers) Creates an instance of this class.ResolverBundle(Map<String, Function<com.github.dakusui.actionunit.core.Context, Object>> resolvers) Creates an instance of this class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ResolverBundleReturns an empty resolver bundle.static ResolverBundleresolverBundleFor(Scene scene, String variableStoreName) Returns a resolver bundle object which figures out both input and output variable values for a givenScene.static ResolverBundleresolverBundleFromDependenciesOf(Method targetMethod, Class<?> accessModelClass) Returns a resolver bundle which is necessary for creating a newSceneCallcall from aScenedefined bytargetMethod.Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesMethods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Constructor Details
-
ResolverBundle
-
ResolverBundle
-
-
Method Details
-
resolverBundleFor
Returns a resolver bundle object which figures out both input and output variable values for a given
Scene. The variables are looked up from a variable store specified by the argumentvariableStoreName.For each input or output variable, a resolver will be created, and it will be an element of the returned bundle.
- Parameters:
scene- A scene for which resolver bundle is created.variableStoreName- A name of variable store, where variable values are looked up.- Returns:
- A new resolver bundle.
-
resolverBundleFromDependenciesOf
public static ResolverBundle resolverBundleFromDependenciesOf(Method targetMethod, Class<?> accessModelClass) Returns a resolver bundle which is necessary for creating a newSceneCallcall from aScenedefined bytargetMethod.- Parameters:
targetMethod- A method which creates aScene.accessModelClass- A class to whichtargetMethodbelongs and from which dependencies oftargetmethod are searched.- Returns:
- A resolver bundle for a
Scenecreated bytargetMethod.
-
emptyResolverBundle
Returns an empty resolver bundle.- Returns:
- An empty resolver bundle.
-