Package org.citrusframework.actions
Class AbstractTestAction
java.lang.Object
org.citrusframework.actions.AbstractTestAction
- All Implemented Interfaces:
org.citrusframework.common.Described,org.citrusframework.common.Named,org.citrusframework.TestAction,org.citrusframework.TestActorAware
- Direct Known Subclasses:
AbstractActionContainer,AbstractAsyncTestAction,AntRunAction,ApplyTestBehaviorAction,CreateEndpointAction,CreateVariablesAction,EchoAction,FailAction,InputAction,JavaAction,LoadPropertiesAction,PurgeEndpointAction,ReceiveMessageAction,ReceiveTimeoutAction,SendMessageAction,SleepAction,StartServerAction,StopServerAction,StopTimeAction,StopTimerAction,Template,TraceVariablesAction,TransformAction,Wait
public abstract class AbstractTestAction
extends Object
implements org.citrusframework.TestAction, org.citrusframework.common.Named, org.citrusframework.common.Described, org.citrusframework.TestActorAware
Abstract base class for test actions. Class provides a default name and description.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractTestAction(String name, AbstractTestActionBuilder<?, ?> builder) -
Method Summary
Modifier and TypeMethodDescriptionabstract voiddoExecute(org.citrusframework.context.TestContext context) Subclasses may add custom execution logic here.voidexecute(org.citrusframework.context.TestContext context) Do basic logging and delegate execution to subclass.org.citrusframework.TestActorgetActor()Gets the actor.getName()booleanisDisabled(org.citrusframework.context.TestContext context) Checks if this test action is disabled.setActor(org.citrusframework.TestActor actor) Sets the actor.setDescription(String description) void
-
Field Details
-
description
Describing the test action
-
-
Constructor Details
-
AbstractTestAction
protected AbstractTestAction() -
AbstractTestAction
-
-
Method Details
-
execute
public void execute(org.citrusframework.context.TestContext context) Do basic logging and delegate execution to subclass.- Specified by:
executein interfaceorg.citrusframework.TestAction
-
isDisabled
public boolean isDisabled(org.citrusframework.context.TestContext context) Checks if this test action is disabled. Delegates to test actor defined for this test action by default. Subclasses may add additional disabled logic here.- Specified by:
isDisabledin interfaceorg.citrusframework.TestAction- Parameters:
context- the current test context.- Returns:
-
doExecute
public abstract void doExecute(org.citrusframework.context.TestContext context) Subclasses may add custom execution logic here. -
getDescription
- Specified by:
getDescriptionin interfaceorg.citrusframework.common.Described
-
setDescription
- Specified by:
setDescriptionin interfaceorg.citrusframework.common.Described
-
getName
- Specified by:
getNamein interfaceorg.citrusframework.TestAction
-
setName
- Specified by:
setNamein interfaceorg.citrusframework.common.Named
-
getActor
public org.citrusframework.TestActor getActor()Gets the actor.- Specified by:
getActorin interfaceorg.citrusframework.TestAction- Returns:
- the actor to get.
-
setActor
Sets the actor.- Specified by:
setActorin interfaceorg.citrusframework.TestActorAware- Parameters:
actor- the actor to set
-