org.jbehave.core
Class AbstractStory

java.lang.Object
  extended by org.jbehave.core.AbstractStory
All Implemented Interfaces:
RunnableStory
Direct Known Subclasses:
JUnitStories, JUnitStory

public abstract class AbstractStory
extends java.lang.Object
implements RunnableStory

Abstract implementation of RunnableStory which is intended as a base class with no explicit support for any test framework. It provides the Embedder used to run the story or stories, using the Configuration and the CandidateSteps specified. By default, MostUsefulConfiguration) and Embedder.Embedder() are used, but these can overridden via the RunnableStory.useConfiguration(Configuration) and RunnableStory.useEmbedder(Embedder) methods respectively.

Users need to add the CandidateSteps instances, via the RunnableStory.addSteps(CandidateSteps...) method.

Typically, users that use JUnit will find it easier to extend other implementations, such as JUnitStory or JUnitStories, which implement the RunnableStory.run() via JUnit's annotations.


Constructor Summary
AbstractStory()
           
 
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
protected  java.util.List<CandidateSteps> candidateSteps()
           
protected  Configuration configuration()
           
protected  Embedder configuredEmbedder()
           
 void useConfiguration(Configuration configuration)
          Specifies the story configuration overriding any default
 void useEmbedder(Embedder embedder)
          Specifies the story embedder overriding any default
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jbehave.core.RunnableStory
run
 

Constructor Detail

AbstractStory

public AbstractStory()
Method Detail

useConfiguration

public void useConfiguration(Configuration configuration)
Description copied from interface: RunnableStory
Specifies the story configuration overriding any default

Specified by:
useConfiguration in interface RunnableStory
Parameters:
configuration - the Configuration

addSteps

public void addSteps(CandidateSteps... steps)
Description copied from interface: RunnableStory
Adds CandidateSteps instances used by the Embedder

Specified by:
addSteps in interface RunnableStory
Parameters:
steps - the CandidateSteps instances used to match textual steps

addSteps

public void addSteps(java.util.List<CandidateSteps> steps)
Description copied from interface: RunnableStory
Adds CandidateSteps instances used by the Embedder

Specified by:
addSteps in interface RunnableStory
Parameters:
steps - the CandidateSteps instances used to match textual steps

useEmbedder

public void useEmbedder(Embedder embedder)
Description copied from interface: RunnableStory
Specifies the story embedder overriding any default

Specified by:
useEmbedder in interface RunnableStory
Parameters:
embedder - the Embedder running the story

configuration

protected Configuration configuration()

candidateSteps

protected java.util.List<CandidateSteps> candidateSteps()

configuredEmbedder

protected Embedder configuredEmbedder()


Copyright © 2003-2010. All Rights Reserved.