com.tngtech.jgiven.base
Class ScenarioTestBase<GIVEN,WHEN,THEN>

java.lang.Object
  extended by com.tngtech.jgiven.base.ScenarioTestBase<GIVEN,WHEN,THEN>
Direct Known Subclasses:
SimpleScenarioTestBase, SzenarioTestBasis

public class ScenarioTestBase<GIVEN,WHEN,THEN>
extends 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
ScenarioTestBase()
           
 
Method Summary
<T> T
addStage(Class<T> stageClass)
          Add a new stage class to the scenario.
 Scenario<GIVEN,WHEN,THEN> createNewScenario()
          Creates a new scenario for this test.
protected  Scenario<GIVEN,WHEN,THEN> createScenario()
           
 Scenario<GIVEN,WHEN,THEN> getScenario()
           
 GIVEN given()
           
 THEN then()
           
 WHEN when()
           
 void wireSteps(CanWire canWire)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScenarioTestBase

public ScenarioTestBase()
Method Detail

createScenario

protected Scenario<GIVEN,WHEN,THEN> createScenario()

given

public GIVEN given()

when

public WHEN when()

then

public THEN then()

wireSteps

public void wireSteps(CanWire canWire)

addStage

public <T> T addStage(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 Scenario<GIVEN,WHEN,THEN> getScenario()
Returns:
the scenario associated with this test

createNewScenario

public Scenario<GIVEN,WHEN,THEN> createNewScenario()
Creates a new scenario for this test.

Returns:
the new scenario


Copyright © 2014 TNG Technology Consulting. All rights reserved.