forked from TNG/JGiven
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We introduce a new interface CurrentScenario similar to CurrentStep which can be injected into stages. The previously introduced addTag() method is moved from ScenarioBase to this new interface. relates to TNG#172
- Loading branch information
Showing
7 changed files
with
124 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
jgiven-core/src/main/java/com/tngtech/jgiven/CurrentScenario.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.tngtech.jgiven; | ||
|
||
import java.lang.annotation.Annotation; | ||
|
||
import com.tngtech.jgiven.annotation.ScenarioState; | ||
|
||
/** | ||
* This interface can be injected into a stage using the {@link ScenarioState} annotation. | ||
* It provided programmatic access to the current scenario. | ||
* | ||
* @since 0.12.0 | ||
*/ | ||
public interface CurrentScenario { | ||
|
||
/** | ||
* Dynamically add a tag to the scenario. | ||
* @param annotationClass The tag annotation class to use. | ||
* @param values List of custom values. | ||
* @since 0.12.0 | ||
*/ | ||
void addTag( Class<? extends Annotation> annotationClass, String... values ); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters