org.jbehave.core
Interface RunnableStory

All Known Implementing Classes:
AbstractStory, JUnitStories, JUnitStory

public interface RunnableStory

Represents a runnable story facade to the Embedder. At a minimum, a runnable story requires CandidateSteps instances to be added via the addSteps(CandidateSteps...), specifying the mapping of textual steps to Java methods. Custom Configuration and Embedder can be specified to override any default via the useConfiguration(Configuration) and useEmbedder(Embedder) methods.

Users can either extend the abstract implementation AbstractStory, which does not implement the run() method, or other implementations, such as JUnitStory or JUnitStories, which implement run() using JUnit's annotations.

Other test frameworks can be supported in much the same way, by extending the abstract implementation and implementing run().

See Also:
AbstractStory, JUnitStory, JUnitStories

Method Summary
 void addSteps(CandidateSteps... steps)
          Adds CandidateSteps instances used by the Embedder
 void addSteps(java.util.List<CandidateSteps> steps)
          Adds CandidateSteps instances used by the Embedder
 void run()
          Runs the story
 void useConfiguration(Configuration configuration)
          Specifies the story configuration overriding any default
 void useEmbedder(Embedder embedder)
          Specifies the story embedder overriding any default
 

Method Detail

run

void run()
         throws java.lang.Throwable
Runs the story

Throws:
java.lang.Throwable

addSteps

void addSteps(CandidateSteps... steps)
Adds CandidateSteps instances used by the Embedder

Parameters:
steps - the CandidateSteps instances used to match textual steps

addSteps

void addSteps(java.util.List<CandidateSteps> steps)
Adds CandidateSteps instances used by the Embedder

Parameters:
steps - the CandidateSteps instances used to match textual steps

useConfiguration

void useConfiguration(Configuration configuration)
Specifies the story configuration overriding any default

Parameters:
configuration - the Configuration

useEmbedder

void useEmbedder(Embedder embedder)
Specifies the story embedder overriding any default

Parameters:
embedder - the Embedder running the story


Copyright © 2003-2010. All Rights Reserved.