Implements S5841.
We have to make sure to support case like:
assertThat(list).isNotEmpty(); assertThat(list.size()).isGreaterThan(1); assertThat(list).allMatch(e -> e.contains(“error”)); assertThat(issues).hasSize(2); assertThat(issues.stream().map(Issue::getRule)).allMatch("java:S1228"::equals); assertThat(list).contains("something").doesNotContainSequence("somethingelse"); assertThat("s").doesNotContain("a");
and even maybe when the list is tested after the allMatch.
In fact, any use of the list in assertion before or after is probably correct.
- contributes to
-
MMF-2016 [Java] Test code quality: AssertJ related rules
-
- Closed
-
- implements
-
RSPEC-5841 AssertJ assertions "allMatch" and "doesNotContains" should also test for emptiness
- Active