Package com.tngtech.jgiven.impl
Class ScenarioBase
java.lang.Object
com.tngtech.jgiven.impl.ScenarioBase
- Direct Known Subclasses:
Scenario
Base class for a Scenario.
Before a Scenario can be used it must be properly configured. After the configuration phase
startScenario(java.lang.Class<?>, java.lang.reflect.Method, java.util.List<com.tngtech.jgiven.report.model.NamedArgument>) must be called in order to execute the scenario. Once started a scenario
cannot be reconfigured.
initialize() should be overridden by subclasses to apply their own configuration to the scenario.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid<T> Tprotected voidvoidfinished()Finishes the scenario.getModel()protected voidvoidAdds a new section to the scenariovoidsetExecutor(ScenarioExecutor executor) voidsetModel(ReportModel reportModel) voidsetStageClassCreator(StageClassCreator stageClassCreator) voidsetStageCreator(StageCreator stageCreator) startScenario(Class<?> testClass, Method method, List<NamedArgument> arguments) startScenario(String description) void
-
Field Details
-
executor
-
modelBuilder
-
-
Constructor Details
-
ScenarioBase
public ScenarioBase()
-
-
Method Details
-
setModel
-
getScenarioModel
-
getScenarioCaseModel
-
getModel
-
addStage
-
finished
Finishes the scenario.- Throws:
Throwable- in case some exception has been thrown during the execution of the scenario
-
aborted
-
getExecutor
-
setExecutor
-
wireSteps
-
startScenario
-
startScenario
-
initialize
protected void initialize() -
assertNotInitialized
protected void assertNotInitialized() -
section
Adds a new section to the scenarioEXPERIMENTAL FEATURE
This is an experimental feature. It might change in the future. If you have any feedback regarding this feature, please let us know by creating an issue at https://github.com/TNG/JGiven/issues- Parameters:
sectionTitle- the title of the section- Since:
- 0.11.0
-
setStageCreator
-
setStageClassCreator
-