[jbehave-user] Parametrised scenario problem

2014-09-19 Thread Zheng, Ayesha(AWF)
Hi all, I have a scenario: Given a user open homepage Then should see message1 When user do something and go to another page Then should see message2 Examples: test.table And test.table with content: |message1|message2| |Welcome|Hello| And step Then should see message1 and Then should see

Re: [jbehave-user] Parametrised scenario problem

2014-09-19 Thread Mauro Talevi
I don't think there is a way to solve it except to have two facade methods that use the appropriately names variable that invoke a third common method that does the check. On 19/09/2014 11:23, Zheng, Ayesha(AWF) wrote: Hi all, I have a scenario: Given a user open homepage Then should see

RE: [jbehave-user] Parametrised scenario problem

2014-09-19 Thread Anders
I would argue that this is a serious bug, a bug that has been there for a long time. This strange lock down of parameter names when using example tables has annoyed me for a long time. This bug is seriously limiting the reusability of step methods. Is there an issue for this in Jira that we

Re: [jbehave-user] Parametrised scenario problem

2014-09-19 Thread Alexander Lehmann
Basically it is not limiting reuse, it just requires a 1-line wrapper @Then(should see message) *public* *void* shouldSeeMsg(@Named(message)String message) { // check text… // check text… // check text… } @Then(should see message1) *public* *void*

Re: [jbehave-user] Parametrised scenario problem

2014-09-19 Thread Mauro Talevi
It's not a bug, it's the current behaviour of the system. Nothing prevents us from evolving this behaviour. Feel free to raise the JIRA issue, describing how you'd like to see it evolve. Cheers On 19/09/2014 16:12, Anders wrote: I would argue that this is a serious bug, a bug that has

RE: [jbehave-user] Parametrised scenario problem

2014-09-19 Thread Anders
If I need to add a new step implementation method (“wrapper”) for each name that the examples table column might have, then I think it is limiting reuse. (by making it harder than it need to be, and by making it less maintainable) Cheers From: Alexander Lehmann