GivenWhenThen for Test Methods
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, and then keywords in comments and methods within a test method.
Further Reference: GivenWhenThen by Martin Fowler
given can be empty. For instance, when you test an exception.
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.