Chained AssertJ assertions should be simplified to the corresponding dedicated assertion#556
Conversation
…dedicated assertion
timtebeek
left a comment
There was a problem hiding this comment.
Great work here @velo! I like how you went ahead and got a comprehensive view of what is and isn't covered already through those parameterized tests. It looks like we already pass ~2/3 of the tests here.
With some adjustments I think we can cover a few more common cases, before perhaps delegating the others to a follow up PR. Let me know your thoughts & plans here! :)
|
I will get them sorted |
…-testing-frameworks into sonar_chained_assertions
|
Hi @velo, are you ok with me polishing this up and merging a smaller increment already? I'm thinking we comment out the failing cases and merge the already nice improvements on this branch. |
|
Hi @timtebeek Sorry, I totally reduced the score of the change to make it a bite size change meant to be merged, but somehow forgot to write an update! |
|
Hi @timtebeek Sorry, I totally reduced the score of the change to make it a bite size change meant to be merged, but somehow forgot to write an update! Go for it |
timtebeek
left a comment
There was a problem hiding this comment.
Nice improvements here! Like how we can cover more cases with less classes; Should help extend the current offerings. I've renamed & revised the classes a bit to make it clear when to use which. Hope you agree & thanks again!

This is not ready yet, but working on it.
From time to time, I get toasted by a sonar code smell, and I decided to make something about it
https://next.sonarqube.com/sonarqube/coding_rules?open=java%3AS5838&rule_key=java%3AS5838
What's changed?
For now, created a test for all rules and start implementing missing recipes.
For now, I'm creating a PR to ask questions.
What's your motivation?
Anything in particular you'd like reviewers to focus on?
Anyone you would like to review specifically?
Have you considered any alternatives or workarounds?
Any additional context
Checklist