JBehave
  1. JBehave
  2. JBEHAVE-432

StepPattern to encapsulate both annotated and resolved patterns and report to the StepMonitor

    Details

    • Type: Improvement Improvement
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.2
    • Component/s: Core
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Currently, only the resolved regex pattern is reported to the StepMonitor, e.g.

      stepMatchesPattern(String step, boolean matches, String pattern, Method method, Object stepsInstance)

      where is step is:

      matching steps were coded in English to make it easier for people to understand

      the resolved regex pattern is:

      matching\s+steps\s+were\s+coded\s+in\s+(.*)\s+to\s+make\s+it\s+easier\s+for\s+people\s+to\s+understand

      It's also useful to report the annotated pattern:

      matching steps were coded in $language to make it easier for people to understand

      A new StepPattern model class should encapsultate both annotated and resolved patterns, and the method should thus read:

      stepMatchesPattern(String step, boolean matches, StepPattern pattern, Method method, Object stepsInstance)

        Activity

        Mauro Talevi made changes -
        Field Original Value New Value
        Summary StepMonitor.stepMatchesPattern signature change StepPattern to encapsulate both annotated and resolved patterns and report to the StepMonitor
        Assignee Mauro Talevi [ maurotalevi ]
        Fix Version/s 3.2 [ 16757 ]
        Description stepMatchesPattern(String step, boolean matches, String pattern, Method method, Object stepsInstance)

        Of the two strings passed in, one is:

           matching steps were coded in English to make it easier for people to understand

        the other is:

           matching\s+steps\s+were\s+coded\s+in\s+(.*)\s+to\s+make\s+it\s+easier\s+for\s+people\s+to\s+understand

        I need this one too:

           matching steps were coded in $language to make it easier for people to understand

        - Paul
        Currently, only the resolved regex pattern is reported to the StepMonitor, e.g.

        stepMatchesPattern(String step, boolean matches, String pattern, Method method, Object stepsInstance)

        where is step is:

           matching steps were coded in English to make it easier for people to understand

        the resolved regex pattern is:

           matching\s+steps\s+were\s+coded\s+in\s+(.*)\s+to\s+make\s+it\s+easier\s+for\s+people\s+to\s+understand

        It's also useful to report the annotated pattern:

           matching steps were coded in $language to make it easier for people to understand

        A new StepPattern model class should encapsultate both annotated and resolved patterns, and the method should thus read:

        stepMatchesPattern(String step, boolean matches, StepPattern pattern, Method method, Object stepsInstance)
        Mauro Talevi made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: