SoftAssertions, but with the following differences: assertAll(),
example:
public class SoftlyTest {
@Rule
public final JUnitSoftAssertions softly = new JUnitSoftAssertions();
@Test
public void testSoftly() throws Exception {
softly.assertThat(1).isEqualTo(2);
softly.assertThat(Lists.newArrayList(1, 2)).containsOnly(1, 2);
}
}
Second, the failures are recognized by IDE's (like IntelliJ IDEA) which open a comparison window.
| Access | Constructor and Description |
|---|---|
| public |
| JUnitSoftAssertions | back to summary |
|---|---|
| public JUnitSoftAssertions() | |