org.junit.rules.TestRulepublic class JUnitBDDSoftAssertions extends AbstractBDDSoftAssertions implements org.junit.rules.TestRule
SoftAssertions, but with the following differences: assertAll(),
example:
public class SoftlyTest {
@Rule
public final JUnitBDDSoftAssertions softly = new JUnitBDDSoftAssertions();
@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 | Description |
|---|---|
JUnitBDDSoftAssertions() |
| Modifier and Type | Method | Description |
|---|---|---|
org.junit.runners.model.Statement |
apply(org.junit.runners.model.Statement base,
org.junit.runner.Description description) |
then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, then, thenerrorsCollected, fail, fail, fail, failBecauseExceptionWasNotThrown, proxy, shouldHaveThrown, wasSuccessthen, 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, thenThrownByCopyright © 2014–2019. All rights reserved.