JBehave
  1. JBehave
  2. JBEHAVE-745

@Named annotation doesn't work in scenario when Examples table and MetaInfo is used

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.5.4
    • Fix Version/s: 3.6
    • Component/s: Core
    • Labels:
      None
    • Environment:
      Windows XP, jdk6
    • Number of attachments :
      1

      Description

      Please take a look at below scenario.
      Meta:
      @supported_type A,B,C
      Given message with supported type
      When received with <field> field
      Then message is stored
      Examples:

      field
      action

      @Named annotation doesn't work when I want to inject @supported_type and also 'field' example value for this scenario.
      I guess problem is in StoryRunner class (lines 254-260). Memthod addMetaParameters is not called when scenario is parametrized.
      Can we invoke this method also for parametrized scenarios?

        Activity

        Hide
        Maciej Madej added a comment -

        Sample project with patched StoryRunner class, changed line is 365 ( addMetaParameters(scenarioParameters, storyAndScenarioMeta)

        Show
        Maciej Madej added a comment - Sample project with patched StoryRunner class, changed line is 365 ( addMetaParameters(scenarioParameters, storyAndScenarioMeta)
        Hide
        Maciej Madej added a comment -

        Please take a look at above project with shows example use of examples table and meta info in scenario.
        I needed to patch StoryRunner class with additional one line. I've added addMetaParameters method invocation in line 365

        Show
        Maciej Madej added a comment - Please take a look at above project with shows example use of examples table and meta info in scenario. I needed to patch StoryRunner class with additional one line. I've added addMetaParameters method invocation in line 365
        Hide
        Mauro Talevi added a comment -

        Applied patch with thanks.

        Show
        Mauro Talevi added a comment - Applied patch with thanks.

          People

          • Assignee:
            Unassigned
            Reporter:
            Maciej Madej
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: