[ 
http://jira.codehaus.org/browse/JBEHAVE-162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=181842#action_181842
 ] 

Douglas Padian commented on JBEHAVE-162:
----------------------------------------

In the end, this is what we did.  But this then forces you to change your 
language to get around this issue.  In my opinion, the code should be flexible 
enough to recognize the difference between two different steps.  The @Order (or 
whatever you want to call that) would do this.  There might be a cleaner way to 
do this, but this was the first thing that came to mind.

> Need to be able to set order of steps for matching
> --------------------------------------------------
>
>                 Key: JBEHAVE-162
>                 URL: http://jira.codehaus.org/browse/JBEHAVE-162
>             Project: JBehave
>          Issue Type: Bug
>    Affects Versions: 2.2
>            Reporter: Douglas Padian
>             Fix For: 2.3
>
>
> We have run into some difficulty declaring steps that have similar wording 
> such that the matching was incorrect for some of our scenarios.  For example:
> We have a line from one of scenarios that looks like this:
> And the table.testtable with test_1_id of foo has exactly one test_2_id of 
> bar 
> We want this line to match on the following step:
> @Given("the $tableName with $whereColumnName of $whereColumnValue has exactly 
> one $selectColumnName of $selectColumnValue")
> But instead the match is always occuring on this step:
> @Given("the $tableName with $whereColumnName of $whereColumnValue has 
> $selectColumnName of $selectColumnValue")
> where $selectColumnName gets interpreted as "exactly one test_2_id"
> Can we have an annotation that indicates the order by which the matching 
> occurs?  That way, the first step in our example would always get compared 
> first to our example input line instead of step two.  For example something 
> like this:
> @Order(1)
> @Given("the $tableName with $whereColumnName of $whereColumnValue has exactly 
> one $selectColumnName of $selectColumnValue")
> @Order(2)
> @Given("the $tableName with $whereColumnName of $whereColumnValue has 
> $selectColumnName of $selectColumnValue")

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
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