Package com.consol.citrus.container
Class Template
- java.lang.Object
-
- com.consol.citrus.actions.AbstractTestAction
-
- com.consol.citrus.container.Template
-
- All Implemented Interfaces:
com.consol.citrus.common.Described
,com.consol.citrus.common.Named
,com.consol.citrus.TestAction
,com.consol.citrus.TestActorAware
public class Template extends AbstractTestAction
This class represents a previously defined block of test actions. Test cases can call templates and reuse their functionality. Templates operate on test variables. While calling, the template caller can set these variables as parameters. Nested test actions are executed in sequence. The template execution may affect existing variable values in the calling test case. So variables may have different values in the test case after template execution. Therefore users can create a local test context by setting globalContext to false. Templates then will have no affect on the variables used in the test case.- Since:
- 2007
- Author:
- Christoph Deppisch
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Template.AbstractTemplateBuilder<T extends Template,B extends Template.AbstractTemplateBuilder<T,B>>
Action builder.static class
Template.Builder
Action builder.
-
Field Summary
-
Fields inherited from class com.consol.citrus.actions.AbstractTestAction
description
-
-
Constructor Summary
Constructors Constructor Description Template(Template.AbstractTemplateBuilder<? extends Template,?> builder)
Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doExecute(com.consol.citrus.context.TestContext context)
Subclasses may add custom execution logic here.List<com.consol.citrus.TestAction>
getActions()
Gets the actions.Map<String,String>
getParameter()
Gets the parameter.boolean
isGlobalContext()
Gets the globalContext.-
Methods inherited from class com.consol.citrus.actions.AbstractTestAction
execute, getActor, getDescription, getName, isDisabled, setActor, setDescription, setName
-
-
-
-
Constructor Detail
-
Template
public Template(Template.AbstractTemplateBuilder<? extends Template,?> builder)
Default constructor- Parameters:
builder
-
-
-
Method Detail
-
doExecute
public void doExecute(com.consol.citrus.context.TestContext context)
Description copied from class:AbstractTestAction
Subclasses may add custom execution logic here.- Specified by:
doExecute
in classAbstractTestAction
-
isGlobalContext
public boolean isGlobalContext()
Gets the globalContext.- Returns:
- the globalContext
-
getActions
public List<com.consol.citrus.TestAction> getActions()
Gets the actions.- Returns:
- the actions
-
-