-
Notifications
You must be signed in to change notification settings - Fork 65
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
GivenWhenThen for Test Methods #371
Comments
|
Not in favour of this one. Firstly, although I broadly follow the pattern, it is often sensible to combine two of the stages or even all of them, e.g. Secondly, tests should also be simple and readable and put technicalities into helper classes. As such I feel it is unnecessary clutter to add comments to every two- or three line test. Personally I subscribe to the idea that unit tests should document the code and like to make use of helper methods to keep tests as simple and readable as possible, see https://blogs.sap.com/2019/04/04/writing-simple-readable-unit-tests/ |
Based on Use given-when-then, can we have a Check recommending the test method to follow the GivenWhenThen style?
The check could scan for
given
,when
, andthen
keywords in comments and methods within a test method.Further Reference: GivenWhenThen by Martin Fowler
The text was updated successfully, but these errors were encountered: