JUnit 5 Soft assertions extension will call assertAll() at the end of each test, we should not report any issue when the class extends SoftAssertionsExtension.class.
See documentation.
@ExtendWith(SoftAssertionsExtension.class) class JUnit5SoftAssertionsExample { @Test void junit5_soft_assertions_example(org.assertj.core.api.SoftAssertions softly) { softly.assertThat(5).isLessThan(3); // No need to call softly.assertAll(), this is automatically done by the SoftAssertionsExtension } }
- is related to
-
SONARJAVA-3650 FP in S2970 for nested class using JUnit 5 Soft assertions extension.
-
- Closed
-
- relates to
-
RSPEC-2970 Assertions should be complete
- Active
- links to