org.jbehave.scenario
Class PropertyBasedConfiguration

java.lang.Object
  extended by org.jbehave.scenario.PropertyBasedConfiguration
All Implemented Interfaces:
Configuration

public class PropertyBasedConfiguration
extends java.lang.Object
implements Configuration

PropertyBasedConfiguration is backed by MostUsefulConfiguration as default, but has different behaviour if certain system properties are non-null:


Field Summary
static java.lang.String FAIL_ON_PENDING
           
static java.lang.String OUTPUT_ALL
           
 
Constructor Summary
PropertyBasedConfiguration()
           
PropertyBasedConfiguration(Configuration defaultConfiguration)
           
 
Method Summary
 StepCreator forCreatingSteps()
          Returns the default StepCreator.
 ScenarioDefiner forDefiningScenarios()
          Returns the default ScenarioDefiner.
 StepdocGenerator forGeneratingStepdoc()
           
 ErrorStrategy forHandlingErrors()
          Returns the default ErrorStrategy for handling errors.
 PendingErrorStrategy forPendingSteps()
          If the system property org.jbehave.failonpending is non-null, returns PendingStepStrategy.FAILING, otherwise returns the defaults.
 ScenarioReporter forReportingScenarios()
          If the system property org.jbehave.outputall is set to TRUE, uses a PrintStreamScenarioReporter; otherwise uses the default ScenarioReporter.
 StepdocReporter forReportingStepdoc()
           
 KeyWords keywords()
          Returns the default keywords.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FAIL_ON_PENDING

public static final java.lang.String FAIL_ON_PENDING
See Also:
Constant Field Values

OUTPUT_ALL

public static final java.lang.String OUTPUT_ALL
See Also:
Constant Field Values
Constructor Detail

PropertyBasedConfiguration

public PropertyBasedConfiguration()

PropertyBasedConfiguration

public PropertyBasedConfiguration(Configuration defaultConfiguration)
Method Detail

forReportingScenarios

public ScenarioReporter forReportingScenarios()
If the system property org.jbehave.outputall is set to TRUE, uses a PrintStreamScenarioReporter; otherwise uses the default ScenarioReporter. Setting org.jbehave.outputall will allow you to see the steps for all scenarios, regardless of whether the scenarios fail.

Specified by:
forReportingScenarios in interface Configuration

forDefiningScenarios

public ScenarioDefiner forDefiningScenarios()
Returns the default ScenarioDefiner.

Specified by:
forDefiningScenarios in interface Configuration

forPendingSteps

public PendingErrorStrategy forPendingSteps()
If the system property org.jbehave.failonpending is non-null, returns PendingStepStrategy.FAILING, otherwise returns the defaults.

Setting org.jbehave.failonpending will cause pending steps to throw an error, so you can see if any steps don't match or are still to be implemented.

Specified by:
forPendingSteps in interface Configuration

forCreatingSteps

public StepCreator forCreatingSteps()
Returns the default StepCreator.

Specified by:
forCreatingSteps in interface Configuration

forHandlingErrors

public ErrorStrategy forHandlingErrors()
Returns the default ErrorStrategy for handling errors.

Specified by:
forHandlingErrors in interface Configuration

keywords

public KeyWords keywords()
Returns the default keywords.

Specified by:
keywords in interface Configuration

forGeneratingStepdoc

public StepdocGenerator forGeneratingStepdoc()
Specified by:
forGeneratingStepdoc in interface Configuration

forReportingStepdoc

public StepdocReporter forReportingStepdoc()
Specified by:
forReportingStepdoc in interface Configuration


Copyright © 2003-2010. All Rights Reserved.