Hi Mauro,

the issue description in the JIRA that Alexander provided in his reply 
(https://jira.codehaus.org/browse/JBEHAVE-800) is exactly what I am seeing.  It 
looks like the workaround is to use two step definitions and name parameters 
differently.

We had quite a few examples set up this way with JBehave 3.5.4, because we 
tried to reuse step definitions as much as possible and aliases seemed to allow 
one to do that.

Thanks.

Maria


From: Mauro Talevi [mailto:[email protected]]
Sent: Tuesday, January 08, 2013 2:13 PM
To: [email protected]
Subject: Re: [jbehave-user] RE: Upgrade from 3.5.4 to 3.7.4 - seeing issues in 
how steps are matched

Hi Maria,

can you please provide a sample project that reproduces your unwanted behaviour 
when changing versions?

Cheers

On 08/01/2013 16:17, Maria Kouras wrote:
Correction: fourth sentence should read: The second step ("I add another risk 
with code 22222 with cost of 9000") should be matched to the Alias in the 
method take the literal parameter of 22222.

From: Maria Kouras
Sent: Tuesday, January 08, 2013 10:16 AM
To: [email protected]<mailto:[email protected]>
Subject: [jbehave-user] Upgrade from 3.5.4 to 3.7.4 - seeing issues in how 
steps are matched

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


Reply via email to