Hi Alex,
Thanks for your reply - it is exactly the issue I'm seeing, and using two 
methods with different parameter names fixes it.  
It probably makes for cleaner DSL anyway, but changing the steps at this point 
is quite a bit of work.  I'm wondering what produced this change in behavior.

Maria

-----Original Message-----
From: Alexander Lehmann [mailto:[email protected]] 
Sent: Tuesday, January 08, 2013 7:09 PM
To: [email protected]
Subject: [jbehave-user] Re: Upgrade from 3.5.4 to 3.7.4 - seeing issues in how 
steps are matched

I noticed this problem a while back (see
https://jira.codehaus.org/browse/JBEHAVE-800 for 3.6.8), but I think we decided 
that this is not easy to change. You can work around the problem by using 2 
different methods, one for the table step and one for the literal step.

OTOH, if this worked differently before, maybe it could be changed some way.

On 08.01.2013 16:15, Maria Kouras wrote:
> Hi all,
>
> After upgrading from 3.5.4 to 3.7.4 some scenarios have stopped 
> working.  There seems to be a change in how steps are matched.  In the 
> scenario below, the first Given step creates a default policy with 
> risk code 11111.  The second step ("I add another risk with code 12345 
> with cost of 9000") should be matched to the Alias in the method take 
> the literal parameter of 22222. Instead, it seems to be matched to the 
> <risk_code> from the table and adds another risk with code 11111.
>
> Any help is greatly appreciated!
>
> --------------------------------------
>
> Given a default insurance policy
>
> And I add another risk with code 22222 with cost of 9000
>
> And I issue the policy
>
> When I change the policy
>
> And I change the cost of risk with <risk_code> to <cost>
>
> Then the rate is <rate>
>
> Examples:
>
> |risk_code  |cost   |rate
>
> |11111      |3      |100
>
> |11111      |7      |200
>
> --------------------------------------
>
> @Given("I add another risk with code <risk_code> with cost of <cost>")
>
> @Alias("I add another risk with code $risk_code with cost of cost")
>
> public void addRiskWithCost(risk_code : String, cost : String) {
>
>                  System.out.println("Additional risk with code: " + 
> risk_code);
>
>                  //code to add the risk add
>
> }
>
> Best Regards,
>
> Maria Kouras
>



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to