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  
         
 25  3
     enum Stage {
 26  1
         BEFORE, AFTER
 27  
     }
 28  
 
 29  
     /**
 30  
      * Collects all of the {@link BeforeStories} or {@link AfterStories} steps to execute.
 31  
      * 
 32  
      * @param candidateSteps
 33  
      * @param stage the {@link Stage} of execution
 34  
      * @return A List of executable {@link Step}s 
 35  
      */
 36  
     List<Step> collectBeforeOrAfterStoriesSteps(List<CandidateSteps> candidateSteps, Stage stage);
 37  
 
 38  
     /**
 39  
      * Collects all of the {@link BeforeStory} or {@link AfterStory} steps to execute.
 40  
      * 
 41  
      * @param candidateSteps the {@link CandidateSteps}.
 42  
      * @param story the {@link Story}.
 43  
      * @param stage the {@link Stage} of execution
 44  
      * @param givenStory whether {@link Story} is a given story
 45  
      * @return A List of executable {@link Step}s 
 46  
      */
 47  
     List<Step> collectBeforeOrAfterStorySteps(List<CandidateSteps> candidateSteps, Story story, Stage stage, boolean givenStory);
 48  
 
 49  
     /**
 50  
      * Collects all of the {@link BeforeScenario} or {@link AfterScenario} steps to execute.
 51  
      * 
 52  
      *
 53  
      * @param candidateSteps the {@link CandidateSteps}.
 54  
      * @param storyAndScenarioMeta the story and scenario {@link org.jbehave.core.model.Meta} parameters
 55  
      * @param type the ScenarioType
 56  
      * @return A List of executable {@link Step}s 
 57  
      */
 58  
     List<Step> collectBeforeOrAfterScenarioSteps(List<CandidateSteps> candidateSteps, Meta storyAndScenarioMeta, Stage stage, ScenarioType type);
 59  
 
 60  
     /**
 61  
      * Collects all lifecycle steps to execute
 62  
      * 
 63  
      * @param candidateSteps the {@link CandidateSteps}.
 64  
      * @param lifecycle the {@link Lifecycle}
 65  
      * @param storyAndScenarioMeta the story and scenario {@link org.jbehave.core.model.Meta} parameters
 66  
      * @param stage the {@link Stage} of execution
 67  
      * @return A List of executable {@link Step}s 
 68  
      */
 69  
     List<Step> collectLifecycleSteps(List<CandidateSteps> candidateSteps, Lifecycle lifecycle, Meta storyAndScenarioMeta, Stage stage);
 70  
 
 71  
     /**
 72  
      * Collects all of the {@link Step}s to execute for a scenario.
 73  
      * 
 74  
      * @param candidateSteps the {@link CandidateSteps}.
 75  
      * @param scenario the {@link Scenario}.
 76  
      * @param parameters the parameters.
 77  
      * @return A List of executable {@link Step}s 
 78  
      */
 79  
     List<Step> collectScenarioSteps(List<CandidateSteps> candidateSteps, Scenario scenario, Map<String, String> parameters);
 80  
     
 81  
 }