org.jbehave.scenario.parser
Class PatternScenarioParser

java.lang.Object
  extended by org.jbehave.scenario.parser.PatternScenarioParser
All Implemented Interfaces:
ScenarioParser

public class PatternScenarioParser
extends java.lang.Object
implements ScenarioParser

Pattern-based scenario parser, which uses the keywords provided to find the steps in the text scenarios.


Nested Class Summary
static class PatternScenarioParser.InvalidPatternException
           
 
Constructor Summary
PatternScenarioParser()
           
PatternScenarioParser(Configuration configuration)
          Deprecated. Since 2.4, use PatternScenarioParser(KeyWords)
PatternScenarioParser(KeyWords keywords)
           
 
Method Summary
 StoryDefinition defineStoryFrom(java.lang.String wholeStoryAsText)
          Defines story from its textual representation
 StoryDefinition defineStoryFrom(java.lang.String wholeStoryAsText, java.lang.String storyPath)
          Defines story from its textual representation and (optional) story path
protected  java.util.List<java.lang.String> splitScenarios(java.lang.String allScenariosInFile)
           
protected  java.util.List<java.lang.String> splitScenariosWithKeyword(java.lang.String allScenariosInFile)
           
protected  java.util.List<java.lang.String> splitScenariosWithPattern(java.lang.String allScenariosInFile)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PatternScenarioParser

public PatternScenarioParser()

PatternScenarioParser

public PatternScenarioParser(KeyWords keywords)

PatternScenarioParser

public PatternScenarioParser(Configuration configuration)
Deprecated. Since 2.4, use PatternScenarioParser(KeyWords)

Method Detail

defineStoryFrom

public StoryDefinition defineStoryFrom(java.lang.String wholeStoryAsText)
Description copied from interface: ScenarioParser
Defines story from its textual representation

Specified by:
defineStoryFrom in interface ScenarioParser
Parameters:
wholeStoryAsText - the textual representation
Returns:
The StoryDefinition

defineStoryFrom

public StoryDefinition defineStoryFrom(java.lang.String wholeStoryAsText,
                                       java.lang.String storyPath)
Description copied from interface: ScenarioParser
Defines story from its textual representation and (optional) story path

Specified by:
defineStoryFrom in interface ScenarioParser
Parameters:
wholeStoryAsText - the textual representation
storyPath - the story path, may be null
Returns:
The StoryDefinition

splitScenarios

protected java.util.List<java.lang.String> splitScenarios(java.lang.String allScenariosInFile)

splitScenariosWithKeyword

protected java.util.List<java.lang.String> splitScenariosWithKeyword(java.lang.String allScenariosInFile)

splitScenariosWithPattern

protected java.util.List<java.lang.String> splitScenariosWithPattern(java.lang.String allScenariosInFile)


Copyright © 2003-2010. All Rights Reserved.