org.jbehave.core.parser
Class PatternStoryParser

java.lang.Object
  extended by org.jbehave.core.parser.PatternStoryParser
All Implemented Interfaces:
StoryParser

public class PatternStoryParser
extends Object
implements StoryParser

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


Nested Class Summary
static class PatternStoryParser.InvalidPatternException
           
 
Constructor Summary
PatternStoryParser()
           
PatternStoryParser(KeyWords keywords)
           
 
Method Summary
 Story defineStoryFrom(String storyAsText)
          Defines story from its textual representation
 Story defineStoryFrom(String storyAsText, String storyPath)
          Defines story from its textual representation and (optional) story path
protected  List<String> splitScenarios(String storyAsText)
           
protected  List<String> splitScenariosWithKeyword(String storyAsText)
           
protected  List<String> splitScenariosWithPattern(String storyAsText)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PatternStoryParser

public PatternStoryParser()

PatternStoryParser

public PatternStoryParser(KeyWords keywords)
Method Detail

defineStoryFrom

public Story defineStoryFrom(String storyAsText)
Description copied from interface: StoryParser
Defines story from its textual representation

Specified by:
defineStoryFrom in interface StoryParser
Parameters:
storyAsText - the textual representation
Returns:
The Story

defineStoryFrom

public Story defineStoryFrom(String storyAsText,
                             String storyPath)
Description copied from interface: StoryParser
Defines story from its textual representation and (optional) story path

Specified by:
defineStoryFrom in interface StoryParser
Parameters:
storyAsText - the textual representation
storyPath - the story path, may be null
Returns:
The Story

splitScenarios

protected List<String> splitScenarios(String storyAsText)

splitScenariosWithKeyword

protected List<String> splitScenariosWithKeyword(String storyAsText)

splitScenariosWithPattern

protected List<String> splitScenariosWithPattern(String storyAsText)


Copyright © 2003-2010. All Rights Reserved.