public class JUnitJupiterBDDSoftAssertions extends AbstractBDDSoftAssertions implements org.junit.jupiter.api.extension.AfterEachCallback
SoftAssertions, but with the following differences: assertAll(), example:
public class SoftlyTest {
@RegisterExtension
public final JUnitJupiterBDDSoftAssertions softly = new JUnitJupiterBDDSoftAssertions();
@Test
public void soft_bdd_assertions() throws Exception {
softly.then(1).isEqualTo(2);
softly.then(Lists.newArrayList(1, 2)).containsOnly(1, 2);
}
}
Second, the failures are recognized by IDE's (like IntelliJ IDEA) which open a comparison window.proxies| Constructor and Description |
|---|
JUnitJupiterBDDSoftAssertions() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterEach(org.junit.jupiter.api.extension.ExtensionContext extensionContext) |
then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, thenthen, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, thenCode, thenObject, thenThrownBy, thenThrownBydecorateErrorsCollected, errorsCollected, fail, fail, fail, failBecauseExceptionWasNotThrown, proxy, shouldHaveThrown, wasSuccessCopyright © 2014–2019 AssertJ. All rights reserved.