-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from TNG/feature-adoc-steps
Add method $ to StageBase for creating ad-hoc steps using lambdas
- Loading branch information
Showing
4 changed files
with
36 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,4 +41,5 @@ public SELF with() { | |
public SELF but() { | ||
return self(); | ||
} | ||
|
||
} |
12 changes: 12 additions & 0 deletions
12
jgiven-core/src/main/java/com/tngtech/jgiven/StepFunction.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,12 @@ | ||
package com.tngtech.jgiven; | ||
|
||
/** | ||
* A functional interface for defining ad-hoc steps. | ||
* | ||
* @see Stage#$(String, StepFunction) | ||
* @param <STAGE> the stage in which this step is executed | ||
*/ | ||
public interface StepFunction<STAGE> { | ||
|
||
public void apply( STAGE stage ) throws Exception; | ||
} |
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