JBehave
  1. JBehave
  2. JBEHAVE-146

PendingErrorStrategy choices needs one more.

    Details

    • Type: Wish Wish
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      PASSING and SILENT are identical method bodies
      The same is true of FAILING and RETHROW

      [ moving past that issue ]

      Could y'all make one more strategy ?

       
         /**
           * This will continue the scenario as PASSING would, but at the end, remember that there was an issue during the run, and throw it again then.
           */
        PendingErrorStrategy FAIL_LATER = new PendingErrorStrategy() { 
              public void handleError(Throwable throwable) {
                  // ??
              }
          };
      

      Note, I've even given you some /** Javadoc */ for this, as http://jbehave.org/javadoc/latest/core/org/jbehave/scenario/errors/PendingErrorStrategy.html is a little sparse on information

        Activity

        Hide
        Mauro Talevi added a comment -

        Paul - PASSING and SILENT are implementations of different types (albeit one extending the other). Similarly, for FAILING and RETHROW.

        They address different concerns - the ErrorStrategy and PendingErrorStrategy - and the fact that the implementation is the same is accidental.

        This is expressed by the fact also by their different names.

        As for the additional PendingErrorStrategy - could you please provide a test case (updating the existing ScenarioRunnerBehaviour) or a scenario to show the use case.

        Show
        Mauro Talevi added a comment - Paul - PASSING and SILENT are implementations of different types (albeit one extending the other). Similarly, for FAILING and RETHROW. They address different concerns - the ErrorStrategy and PendingErrorStrategy - and the fact that the implementation is the same is accidental. This is expressed by the fact also by their different names. As for the additional PendingErrorStrategy - could you please provide a test case (updating the existing ScenarioRunnerBehaviour) or a scenario to show the use case.
        Hide
        Paul Hammant added a comment -

        It's a pretty open arch. I can implement something that works for me, and donate back

        Show
        Paul Hammant added a comment - It's a pretty open arch. I can implement something that works for me, and donate back
        Hide
        Mauro Talevi added a comment -

        That would be very welcome!

        Show
        Mauro Talevi added a comment - That would be very welcome!
        Hide
        Mauro Talevi added a comment -

        Paul, do you feel you still need more choices?

        Show
        Mauro Talevi added a comment - Paul, do you feel you still need more choices?
        Mauro Talevi made changes -
        Field Original Value New Value
        Comment [ Paul, do you feel you still need more choices? ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Paul Hammant
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: