Class ExecutionStateImpl
- java.lang.Object
-
- de.bmiag.tapir.execution.executor.ExecutionStateImpl
-
- All Implemented Interfaces:
ExecutionState
,MutableExecutionState
@Component("tapirExecutionState") @Scope(scopeName="thread", proxyMode=INTERFACES) public class ExecutionStateImpl extends java.lang.Object implements MutableExecutionState
Default implementation ofMutableExecutionState
which is just a container for the test step which is bound to the current thread.- Since:
- 2.0.0
- Author:
- Oliver Libutzki <[email protected]>
-
-
Constructor Summary
Constructors Constructor Description ExecutionStateImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<TestStep>
getCurrentTestStep()
Returns the current test step.void
setCurrentTestStep(java.util.Optional<TestStep> currentTestStep)
Sets the current test step to the current thread.
-
-
-
Method Detail
-
getCurrentTestStep
@Pure public java.util.Optional<TestStep> getCurrentTestStep()
Description copied from interface:ExecutionState
Returns the current test step. If test classes or steps are executed in parallel the current test step of the current thread is returned.- Specified by:
getCurrentTestStep
in interfaceExecutionState
- Returns:
- the current test step, cannot be null, but the optional might be empty
-
setCurrentTestStep
public void setCurrentTestStep(java.util.Optional<TestStep> currentTestStep)
Description copied from interface:MutableExecutionState
Sets the current test step to the current thread. This method should never be called from test code and is intended for tapir internal usage.- Specified by:
setCurrentTestStep
in interfaceMutableExecutionState
- Parameters:
currentTestStep
- current TestStep- See Also:
StepStartedStateUpdater
,StepFinishedStateUpdater
-
-