|
||||||||
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 |
- [jbehave-dev] [jira] (JBEHAVE-883) Add support fo... Julian Greculescu (JIRA)
- [jbehave-dev] [jira] (JBEHAVE-883) Add suppo... Joachim Nilsson (JIRA)
- [jbehave-dev] [jira] (JBEHAVE-883) Add suppo... Julian Greculescu (JIRA)
- [jbehave-dev] [jira] (JBEHAVE-883) Support s... Mauro Talevi (JIRA)
- [jbehave-dev] [jira] (JBEHAVE-883) Support s... Mauro Talevi (JIRA)
- [jbehave-dev] [jira] (JBEHAVE-883) Support s... Mauro Talevi (JIRA)
- [jbehave-dev] [jira] (JBEHAVE-883) Support s... Mauro Talevi (JIRA)
>>If I relate to Java code, this would be parameters to a factory method or a builder. Am I correct?
Kind of. In reality it is a story context attached to the thread local. The reason for the context exists is because we need to pass story data between different steps classes that are grouped based on what they do rather than on the story they are part of. We done it this way for steps reusability in different stories. Any steps could write/read stuff from that context regardless of how they are labelled (Given/When/Then/And).
But yes you are right it would be a builder that would read that context and create the payment. We create the builder when we need it rather than at the start but this is implementation detail.
>>Disregarding the huge implications of changing the language,
I think huge is too much to say. Yes it would be a language change but for the better. Having the optional choice to define “And” synonyms it does not imply it must be used. You just have it as an extra feature for the purpose of making your story sound more natural.
>>consider adding a 'With' statement that would allow us to pass parameters from that line to a builder created in the first Given/When/Then statement.
In my example I used ‘With’ and ‘Having’ just for the purpose of making it clear what I was talking about. ‘With’ and ‘Having’ are just ‘And’ synonyms. Any word could be defined as an ‘And’ synonym (of course not Given/When/Then)
Then, when no more 'With' lines are found. The builder object will be created and passed as parameter to the 'When a FX transaction message arrives' method.
>>Would this be something to consider?
No more ‘With’ lines should not be a trigger. It should be a certain steps to trigger the FX transaction arrival.
So in short I see a change like this as being able to have multiple ‘And’ equivalents and its only purpose is to make the story more fluent for the case of very long scenarios.