Coverage Report - org.jbehave.core.steps.StepCollector
 
Classes in this File Line Coverage Branch Coverage Complexity
StepCollector
N/A
N/A
1
StepCollector$Stage
100%
2/2
N/A
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.annotations.ScenarioType;
 13  
 import org.jbehave.core.model.Lifecycle;
 14  
 import org.jbehave.core.model.Meta;
 15  
 import org.jbehave.core.model.Scenario;
 16  
 import org.jbehave.core.model.Story;
 17  
 
 18  
 /**
 19  
  * Represents the strategy for the collection of executable {@link Step}s from a
 20  
  * story or scenario matching a list of {@link CandidateSteps}. It also collects the 
 21  
  * steps to run at before/after stages.
 22  
  */
 23  
 public interface StepCollector {
 24  3
     enum Stage {
 25  1
         BEFORE, AFTER
 26  
     }
 27  
 
 28  
     /**
 29  
      * Collects all of the {@link BeforeStories} or {@link AfterStories} steps to execute.
 30  
      * 
 31  
      * @param candidateSteps
 32  
      * @param stage the {@link Stage} of execution
 33  
      * @return A List of executable {@link Step}s 
 34  
      */
 35  
     List<Step> collectBeforeOrAfterStoriesSteps(List<CandidateSteps> candidateSteps, Stage stage);
 36  
 
 37  
     /**
 38  
      * Collects all of the {@link BeforeStory} or {@link AfterStory} steps to execute.
 39  
      * 
 40  
      * @param candidateSteps the {@link CandidateSteps}.
 41  
      * @param story the {@link Story}.
 42  
      * @param stage the {@link Stage} of execution
 43  
      * @param givenStory whether {@link Story} is a given story
 44  
      * @return A List of executable {@link Step}s 
 45  
      */
 46  
     List<Step> collectBeforeOrAfterStorySteps(List<CandidateSteps> candidateSteps, Story story, Stage stage, boolean givenStory);
 47  
 
 48  
     /**
 49  
      * Collects all of the {@link BeforeScenario} or {@link AfterScenario} steps to execute.
 50  
      * 
 51  
      *
 52  
      * @param candidateSteps the {@link CandidateSteps}.
 53  
      * @param storyAndScenarioMeta the story and scenario {@link org.jbehave.core.model.Meta} parameters
 54  
      * @param type the ScenarioType
 55  
      * @return A List of executable {@link Step}s 
 56  
      */
 57  
     List<Step> collectBeforeOrAfterScenarioSteps(List<CandidateSteps> candidateSteps, Meta storyAndScenarioMeta, Stage stage, ScenarioType type);
 58  
 
 59  
     /**
 60  
      * Collects all lifecycle steps to execute
 61  
      * 
 62  
      * @param candidateSteps the {@link CandidateSteps}.
 63  
      * @param lifecycle the {@link Lifecycle}
 64  
      * @param storyAndScenarioMeta TODO
 65  
      * @param stage the {@link Stage} of execution
 66  
      * @return A List of executable {@link Step}s 
 67  
      */
 68  
     List<Step> collectLifecycleSteps(List<CandidateSteps> candidateSteps, Lifecycle lifecycle, Meta storyAndScenarioMeta, Stage stage);
 69  
 
 70  
     /**
 71  
      * Collects all of the {@link Step}s to execute for a scenario.
 72  
      * 
 73  
      * @param candidateSteps the {@link CandidateSteps}.
 74  
      * @param scenario the {@link Scenario}.
 75  
      * @param parameters the parameters.
 76  
      * @return A List of executable {@link Step}s 
 77  
      */
 78  
     List<Step> collectScenarioSteps(List<CandidateSteps> candidateSteps, Scenario scenario, Map<String, String> parameters);
 79  
 }