Implements RSPEC-5853.
In order to avoid false positive, we have to make sure that:
- Two assertThat are consecutive:
// Compliant assertThat(someList).hasSize(3); doSomethingModifyingSomeList(); assertThat(someList).contains("something");
- some method might not be relevant (extract, filter, usecomparator)
// Compliant assertThat(X).usingComparator(...).containsAnyOf(...); assertThat(X).containsAnyOf(...);
One solution could be to report only when there is one method call after the assertThat.
- contributes to
-
MMF-2016 [Java] Test code quality: AssertJ related rules
-
- Closed
-
- implements
-
RSPEC-5853 Consecutive AssertJ "assertThat" statements should be chained
- Active