JBehave
  1. JBehave
  2. JBEHAVE-1004

JBehave Eclipse Editor says "No step is matching" when using a constant inside annotations

    Details

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

      Description

      With JBehave it is possible to annotate a step method with @Given and @When at the same time, for example:

      @Given("I take a screenshot")
      @When("I take a screenshot")
      public void screenshot() {}
      

      I tried not to repat myself and changed that to:

      private static final SCREENSHOT_STEP_NAME = "I take a screenshot";
      @Given(SCREENSHOT_STEP_NAME)
      @When(SCREENSHOT_STEP_NAME)
      public void screenshot() {}
      

      That compiles and works when executing the story using the step. The step method is really called.

      But in the JBehave Eclipse Editor it says that no step is matching the step name "I take a screenshot". It has to do with using the constant for the annotations. So I think it is a bug in the JBehave Eclipse editor.

        Activity

        There are no entries against this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Otto Diesel
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: