Package com.tngtech.jgiven.base
Class ScenarioTestBase<GIVEN,WHEN,THEN>
- java.lang.Object
-
- com.tngtech.jgiven.base.ScenarioTestBase<GIVEN,WHEN,THEN>
-
- Direct Known Subclasses:
CenarioTesteBase
,DualScenarioTestBase
,EscenarioTestBase
,SimpleScenarioTestBase
,SzenarioTestBasis
,TestDeScenarioBase
public abstract class ScenarioTestBase<GIVEN,WHEN,THEN> extends java.lang.Object
Base class for Scenario tests. This class is typically not directly used by end users, but instead test-framework-specific classes for JUnit or TestNG
-
-
Constructor Summary
Constructors Constructor Description ScenarioTestBase()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description <T> T
addStage(java.lang.Class<T> stageClass)
Add a new stage class to the scenario.com.tngtech.jgiven.impl.Scenario<GIVEN,WHEN,THEN>
createNewScenario()
protected com.tngtech.jgiven.impl.Scenario<GIVEN,WHEN,THEN>
createScenario()
abstract com.tngtech.jgiven.impl.Scenario<GIVEN,WHEN,THEN>
getScenario()
GIVEN
given()
void
section(java.lang.String sectionTitle)
Adds a new section to the scenarioTHEN
then()
WHEN
when()
void
wireSteps(CanWire canWire)
-
-
-
Method Detail
-
given
public GIVEN given()
-
when
public WHEN when()
-
then
public THEN then()
-
section
public void section(java.lang.String sectionTitle)
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
-
wireSteps
public void wireSteps(CanWire canWire)
-
addStage
public <T> T addStage(java.lang.Class<T> stageClass)
Add a new stage class to the scenario.- Parameters:
stageClass
- the class with the step definitions- Returns:
- a new instance of the given class enhanced by JGiven
-
getScenario
public abstract com.tngtech.jgiven.impl.Scenario<GIVEN,WHEN,THEN> getScenario()
- Returns:
- the scenario associated with this test
-
-