Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
StepCollector |
|
| 1.0;1 | ||||
StepCollector$Stage |
|
| 1.0;1 |
1 | package org.jbehave.core.steps; | |
2 | ||
3 | import java.util.List; | |
4 | import java.util.Map; | |
5 | ||
6 | import org.jbehave.core.annotations.AfterScenario; | |
7 | import org.jbehave.core.annotations.AfterStories; | |
8 | import org.jbehave.core.annotations.AfterStory; | |
9 | import org.jbehave.core.annotations.BeforeScenario; | |
10 | import org.jbehave.core.annotations.BeforeStories; | |
11 | import org.jbehave.core.annotations.BeforeStory; | |
12 | import org.jbehave.core.model.Scenario; | |
13 | import org.jbehave.core.model.Story; | |
14 | ||
15 | /** | |
16 | * Represents the strategy for the collection of executable {@link Step}s from a | |
17 | * story or scenario matching a list of {@link CandidateSteps}. It also collects the | |
18 | * steps to run at before/after stages. | |
19 | */ | |
20 | public interface StepCollector { | |
21 | 3 | enum Stage { |
22 | 1 | BEFORE, AFTER |
23 | } | |
24 | ||
25 | /** | |
26 | * Collects all of the {@link BeforeStories} or {@link AfterStories} steps to execute. | |
27 | * | |
28 | * @param candidateSteps | |
29 | * @param stage the {@link Stage} of execution | |
30 | * @return A List of executable {@link Step}s | |
31 | */ | |
32 | List<Step> collectBeforeOrAfterStoriesSteps(List<CandidateSteps> candidateSteps, Stage stage); | |
33 | ||
34 | /** | |
35 | * Collects all of the {@link BeforeStory} or {@link AfterStory} steps to execute. | |
36 | * | |
37 | * @param candidateSteps the {@link CandidateSteps}. | |
38 | * @param story the {@link Story}. | |
39 | * @param stage the {@link Stage} of execution | |
40 | * @param givenStory whether {@link Story} is a given story | |
41 | * @return A List of executable {@link Step}s | |
42 | */ | |
43 | List<Step> collectBeforeOrAfterStorySteps(List<CandidateSteps> candidateSteps, Story story, Stage stage, boolean givenStory); | |
44 | ||
45 | /** | |
46 | * Collects all of the {@link BeforeScenario} or {@link AfterScenario} steps to execute. | |
47 | * | |
48 | * @param candidateSteps the {@link CandidateSteps}. | |
49 | * @param failureOccured whether a failure occured in the scenario execution | |
50 | * @param parameters the parameters. | |
51 | * @return A List of executable {@link Step}s | |
52 | */ | |
53 | List<Step> collectBeforeOrAfterScenarioSteps(List<CandidateSteps> candidateSteps, Stage stage, boolean failureOccured); | |
54 | ||
55 | /** | |
56 | * Collects all of the {@link Step}s to execute for a scenario. | |
57 | * | |
58 | * @param candidateSteps the {@link CandidateSteps}. | |
59 | * @param scenario the {@link Scenario}. | |
60 | * @param parameters the parameters. | |
61 | * @return A List of executable {@link Step}s | |
62 | */ | |
63 | List<Step> collectScenarioSteps(List<CandidateSteps> candidateSteps, Scenario scenario, Map<String, String> parameters); | |
64 | } |