You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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. cl_abap_unit_assert=>assert_initial( cut->meth( ) )..
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/
given-when-then comments would not add any value here.
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: