JBehave
  1. JBehave
  2. JBEHAVE-141

Allow mutability of StepsConfiguration instance

    Details

    • Type: Wish Wish
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.1
    • Component/s: Core
    • Labels:
      None
    • Number of attachments :
      0

      Description

      See also JBEHAVE-140

      When using Selenium it is customary to use setUp (or modern equiv) to acquire a Selenium instance.

      Yet JBehave's Scenario sub-classes and Steps sub-classes are all about setting everything in super(..) calls. You can't in Java use member variables before super() invocations have all finished.

      I have patched a version of JBehave and can confirm that this works.

        Activity

        Hide
        Mauro Talevi added a comment -

        Hi Paul - can you attach the patch that displays the use case?

        Show
        Mauro Talevi added a comment - Hi Paul - can you attach the patch that displays the use case?
        Mauro Talevi made changes -
        Field Original Value New Value
        Assignee Mauro Talevi [ maurotalevi ]
        Fix Version/s 2.1 [ 14547 ]
        Affects Version/s 2.0 [ 14456 ]
        Hide
        Mauro Talevi added a comment -

        Added useMonitor(StepMonitor monitor) method.

        Show
        Mauro Talevi added a comment - Added useMonitor(StepMonitor monitor) method.
        Mauro Talevi made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Mauro Talevi added a comment -

        Renamed title to capture broader scope of refactor - each injected dependency should have a use*() method to allow modification after instantiation.

        Show
        Mauro Talevi added a comment - Renamed title to capture broader scope of refactor - each injected dependency should have a use*() method to allow modification after instantiation.
        Mauro Talevi made changes -
        Summary StepsConfiguration - can it have a setMonitor(..) method please Allow mutability of StepsConfiguration instance
        Hide
        Mauro Talevi added a comment -

        Added use methods for all of StepsConfiguration dependencies.

        They are called use methods to underline that a default value of the dependency is always set, but can be overridden.

        Show
        Mauro Talevi added a comment - Added use methods for all of StepsConfiguration dependencies. They are called use methods to underline that a default value of the dependency is always set, but can be overridden.
        Mauro Talevi made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Mauro Talevi
            Reporter:
            Paul Hammant
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: