Issue Type: Bug Bug
Affects Versions: 3.7
Assignee: Unassigned
Components: Core
Created: 05/Oct/12 2:55 AM
Description:

The issue occurs only when a step has more than one parameter, and the value of at least one of those parameters is found as a part of another parameter (a parameter value is a substring of another parameter value).

E.g.
Step:
Given a stock of symbol $symbol and a threshold of $threshold
Step usage:
Given a stock of symbol ABC13DEF and a threshold of 13
In the report:
Given a stock of symbol ABC13 DEF and a threshold of 13

The issue is due to a flawed implementation in StepCreator class, method replaceParameterValue(). We need a more elaborated replace algorithm in order to take into account this kind of special cases.
Once a parameter is replaced with the value bearing the start/end placeholders, it should become "locked"; we don't want the next parameter value replacement to replace values into the previous ones.

Also the replacement of parameters values in step should be driven by parameters values length not by position to avoid partial replacements. (see parametrisedStep() method)

Environment: Win XP, Java 1.6
Project: JBehave
Priority: Minor Minor
Reporter: Catalin Sandila
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

Reply via email to