-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds a `StepDefinedEvent` to replace the `StepDefinitionReporter` plugin interface. ## Details Publish an event from `Glue.addStepDefinition`, as `Runner.reportStepDefinitions` is called before step definition classes are instantiated, which fails to pick up on lambda based steps. ## Motivation and Context Provide an event to listen for steps being registered, so all steps registrations are available, instead of only the annotation based step definitions. #1633
- Loading branch information
1 parent
6469d70
commit f172c4f
Showing
14 changed files
with
245 additions
and
37 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
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
13 changes: 13 additions & 0 deletions
13
core/src/main/java/cucumber/api/event/StepDefinedEvent.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,13 @@ | ||
package cucumber.api.event; | ||
|
||
import cucumber.runtime.StepDefinition; | ||
|
||
public class StepDefinedEvent extends TimeStampedEvent { | ||
public final StepDefinition stepDefinition; | ||
|
||
public StepDefinedEvent(Long time, Long timeMillis, StepDefinition stepDefinition) { | ||
super(time, timeMillis); | ||
this.stepDefinition = stepDefinition; | ||
} | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package cucumber.runtime; | ||
|
||
public interface ScenarioScoped { | ||
/** | ||
* Dispose references to Runtime world to allow garbage collection to run. | ||
*/ | ||
void disposeScenarioScope(); | ||
} |
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
Oops, something went wrong.