JBehave

Merge story/steps configuration

Details

  • Type: New Feature New Feature
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 3.0
  • Component/s: Core
  • Labels:
    None
  • Number of attachments :
    0

Description

Story and steps configuration should be merged, maintaining what worked well and removing what did not.

Criterias for refactor:

  • Elements of the configuration should always have default values and should be overridable singularly, after instantiation.
  • Immutability of configuration can be obtained by decorating a configuration and disabling the use* methods. ImmutableConfiguration decorator should throw an exception when use* method invoked.
  • Default MostUsefulConfiguration should always be available to runners and should not be required as parameters in super() invocations.

Activity

Hide
Mauro Talevi added a comment - - edited

Renamed Configuration to StoryConfiguration and converted interface to abstract class.

JUnitStory always starts with MostUsefulStoryConfiguration and allows overriding configuration only via useConfiguration(StoryConfiguration) method.

Added MostUsefulStepsConfiguration and Unmodifiable[Story|Steps]Configuration decorators.

Show
Mauro Talevi added a comment - - edited Renamed Configuration to StoryConfiguration and converted interface to abstract class. JUnitStory always starts with MostUsefulStoryConfiguration and allows overriding configuration only via useConfiguration(StoryConfiguration) method. Added MostUsefulStepsConfiguration and Unmodifiable[Story|Steps]Configuration decorators.
Hide
Cristiano Gavião added a comment -

Mauro, should be possible that all jbehave configuration classes have one constructor annotated with @javax.inject.Inject, so we could use DI for all jbehave configuration stuffs ?

regards

Cristiano

Show
Cristiano Gavião added a comment - Mauro, should be possible that all jbehave configuration classes have one constructor annotated with @javax.inject.Inject, so we could use DI for all jbehave configuration stuffs ? regards Cristiano
Hide
Mauro Talevi added a comment -

Created separate issue JBEHAVE-265 to track annotation-based configuration.

Show
Mauro Talevi added a comment - Created separate issue JBEHAVE-265 to track annotation-based configuration.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: