-
-
Notifications
You must be signed in to change notification settings - Fork 529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updating Scenario hooks examples to be more like a SSCCE #424
Comments
Hi @Brice1994 - thanks for pointing that out. I would love better examples, if you are willing to start a PR for that. I'd prefer the examples to be consistent, so if you don't mind updating all the examples in this section, I'd be very grateful! |
Ok, just a couple questions before I move on with it,
|
Ad 1. Yes, please examples in English. A small note about other languages would be nice, if it doesn't create any confusion (i.e. it might lead to having to explain how to use cucumber with other languages, which may or may not be a separate PR. Idk) |
Ad 2. Not sure what we have now, or whether we recommend one over the other. @mpkorstanje might know? |
The annotated method has my preference. To avoid making the java doc overly complex I'd focus on |
SSCCE
The examples given in the API documentation are a bit too minimal, and they had me digging around for examples elsewhere, i.e. in the Scenario hooks page:
Before
Before hooks run before the first step of each scenario.
Annotated method style:
Lambda style:
These are the examples given but the actual implementation requires a bit more, at least in the lambda case:
It doesn't mention anywhere on the page about implementing "En", or that a class constructor is needed for a working example. I would make a change request, but I am not sure on the styling, should there be a full example in each case? or just one at the top.
Thanks for reading.
The text was updated successfully, but these errors were encountered: