org.jbehave.core.parser
Class RegexStoryParser
java.lang.Object
org.jbehave.core.parser.RegexStoryParser
- All Implemented Interfaces:
- StoryParser
public class RegexStoryParser
- extends java.lang.Object
- implements StoryParser
Pattern-based story parser, which uses the keywords provided to parse the
textual story into a Story
, which comprises of a collection of
Scenario
s, each of which contains a number of steps.
Method Summary |
Story |
parseStory(java.lang.String storyAsText)
Parses story from its textual representation |
Story |
parseStory(java.lang.String storyAsText,
java.lang.String storyPath)
Parses story from its textual representation and (optional) story path |
protected java.util.List<java.lang.String> |
splitScenarios(java.lang.String storyAsText)
|
protected java.util.List<java.lang.String> |
splitScenariosWithKeyword(java.lang.String storyAsText)
|
protected java.util.List<java.lang.String> |
splitScenariosWithPattern(java.lang.String storyAsText)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RegexStoryParser
public RegexStoryParser()
RegexStoryParser
public RegexStoryParser(Keywords keywords)
parseStory
public Story parseStory(java.lang.String storyAsText)
- Description copied from interface:
StoryParser
- Parses story from its textual representation
- Specified by:
parseStory
in interface StoryParser
- Parameters:
storyAsText
- the textual representation
- Returns:
- The Story
parseStory
public Story parseStory(java.lang.String storyAsText,
java.lang.String storyPath)
- Description copied from interface:
StoryParser
- Parses story from its textual representation and (optional) story path
- Specified by:
parseStory
in interface StoryParser
- Parameters:
storyAsText
- the textual representationstoryPath
- the story path, may be null
- Returns:
- The Story
splitScenarios
protected java.util.List<java.lang.String> splitScenarios(java.lang.String storyAsText)
splitScenariosWithKeyword
protected java.util.List<java.lang.String> splitScenariosWithKeyword(java.lang.String storyAsText)
splitScenariosWithPattern
protected java.util.List<java.lang.String> splitScenariosWithPattern(java.lang.String storyAsText)
Copyright © 2003-2010. All Rights Reserved.