org.jbehave.core
Class StoryConfiguration

java.lang.Object
  extended by org.jbehave.core.StoryConfiguration
Direct Known Subclasses:
MostUsefulStoryConfiguration, PropertyBasedStoryConfiguration, UnmodifiableStoryConfiguration

public class StoryConfiguration
extends java.lang.Object

Provides the story configuration used by the StoryRunner and the in the RunnableStory implementations to customise its runtime properties.

StoryConfiguration dependencies can be provided either via constructor or via use* methods, which override the the default values of the dependency, which is always set. The use methods allow to override the dependencies one by one and play nicer with a Java hierarchical structure, in that does allow the use of non-static member variables.

Author:
Elizabeth Keogh, Mauro Talevi

Constructor Summary
  StoryConfiguration()
          Default no-op constructor, uses the default instances defined for member variables.
protected StoryConfiguration(Keywords keywords, StepCreator stepCreator, StoryParser storyParser, StoryLoader storyLoader, StoryPathResolver storyPathResolver, ErrorStrategy errorStrategy, StepdocReporter stepdocReporter, StepdocGenerator stepdocGenerator, StoryReporter storyReporter, StoryReporterBuilder storyReporterBuilder, PendingErrorStrategy pendingErrorStrategy)
          Constructor that allows all dependencies to be injected
 
Method Summary
 StoryConfiguration buildReporters(java.util.List<java.lang.String> storyPaths)
           
 StoryConfiguration buildReporters(java.lang.String... storyPaths)
           
 ErrorStrategy errorStrategy()
           
 Keywords keywords()
           
 PendingErrorStrategy pendingErrorStrategy()
           
 StepCreator stepCreator()
           
 StepdocGenerator stepdocGenerator()
           
 StepdocReporter stepdocReporter()
           
 StoryLoader storyLoader()
           
 StoryParser storyParser()
           
 StoryPathResolver storyPathResolver()
           
 StoryReporter storyReporter()
           
 StoryReporter storyReporter(java.lang.String storyPath)
           
 StoryReporterBuilder storyReporterBuilder()
           
 StoryConfiguration useErrorStrategy(ErrorStrategy errorStrategy)
           
 StoryConfiguration useKeywords(Keywords keywords)
           
 StoryConfiguration usePendingErrorStrategy(PendingErrorStrategy pendingErrorStrategy)
           
 StoryConfiguration useStepCreator(StepCreator stepCreator)
           
 StoryConfiguration useStepdocGenerator(StepdocGenerator stepdocGenerator)
           
 StoryConfiguration useStepdocReporter(StepdocReporter stepdocReporter)
           
 StoryConfiguration useStoryLoader(StoryLoader storyLoader)
           
 StoryConfiguration useStoryParser(StoryParser storyParser)
           
 StoryConfiguration useStoryPathResolver(StoryPathResolver storyPathResolver)
           
 StoryConfiguration useStoryReporter(StoryReporter storyReporter)
           
 StoryConfiguration useStoryReporter(java.lang.String storyPath, StoryReporter storyReporter)
           
 StoryConfiguration useStoryReporterBuilder(StoryReporterBuilder storyReporterBuilder)
           
 StoryConfiguration useStoryReporters(java.util.Map<java.lang.String,StoryReporter> storyReporters)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StoryConfiguration

public StoryConfiguration()
Default no-op constructor, uses the default instances defined for member variables.


StoryConfiguration

protected StoryConfiguration(Keywords keywords,
                             StepCreator stepCreator,
                             StoryParser storyParser,
                             StoryLoader storyLoader,
                             StoryPathResolver storyPathResolver,
                             ErrorStrategy errorStrategy,
                             StepdocReporter stepdocReporter,
                             StepdocGenerator stepdocGenerator,
                             StoryReporter storyReporter,
                             StoryReporterBuilder storyReporterBuilder,
                             PendingErrorStrategy pendingErrorStrategy)
Constructor that allows all dependencies to be injected

Parameters:
keywords -
stepCreator -
storyParser -
storyLoader -
storyPathResolver -
errorStrategy -
stepdocReporter -
stepdocGenerator -
storyReporter -
storyReporterBuilder -
pendingErrorStrategy -
Method Detail

stepCreator

public StepCreator stepCreator()

storyParser

public StoryParser storyParser()

storyLoader

public StoryLoader storyLoader()

storyPathResolver

public StoryPathResolver storyPathResolver()

errorStrategy

public ErrorStrategy errorStrategy()

pendingErrorStrategy

public PendingErrorStrategy pendingErrorStrategy()

storyReporter

public StoryReporter storyReporter()

storyReporter

public StoryReporter storyReporter(java.lang.String storyPath)

storyReporterBuilder

public StoryReporterBuilder storyReporterBuilder()

keywords

public Keywords keywords()

stepdocGenerator

public StepdocGenerator stepdocGenerator()

stepdocReporter

public StepdocReporter stepdocReporter()

useKeywords

public StoryConfiguration useKeywords(Keywords keywords)

useStepCreator

public StoryConfiguration useStepCreator(StepCreator stepCreator)

usePendingErrorStrategy

public StoryConfiguration usePendingErrorStrategy(PendingErrorStrategy pendingErrorStrategy)

useErrorStrategy

public StoryConfiguration useErrorStrategy(ErrorStrategy errorStrategy)

useStoryParser

public StoryConfiguration useStoryParser(StoryParser storyParser)

useStoryLoader

public StoryConfiguration useStoryLoader(StoryLoader storyLoader)

useStoryPathResolver

public StoryConfiguration useStoryPathResolver(StoryPathResolver storyPathResolver)

useStoryReporter

public StoryConfiguration useStoryReporter(StoryReporter storyReporter)

useStoryReporter

public StoryConfiguration useStoryReporter(java.lang.String storyPath,
                                           StoryReporter storyReporter)

useStoryReporters

public StoryConfiguration useStoryReporters(java.util.Map<java.lang.String,StoryReporter> storyReporters)

useStoryReporterBuilder

public StoryConfiguration useStoryReporterBuilder(StoryReporterBuilder storyReporterBuilder)

buildReporters

public StoryConfiguration buildReporters(java.lang.String... storyPaths)

buildReporters

public StoryConfiguration buildReporters(java.util.List<java.lang.String> storyPaths)

useStepdocReporter

public StoryConfiguration useStepdocReporter(StepdocReporter stepdocReporter)

useStepdocGenerator

public StoryConfiguration useStepdocGenerator(StepdocGenerator stepdocGenerator)


Copyright © 2003-2010. All Rights Reserved.