Top Description Fields Constructors Methods
org.assertj.core.api

public Class JUnitBDDSoftAssertions

extends AbstractSoftAssertions
implements BDDSoftAssertionsProvider, SoftAssertionsRule
Class Inheritance
All Implemented Interfaces
org.assertj.core.api.SoftAssertionsRule, org.junit.rules.TestRule, org.assertj.core.api.SoftAssertionsProvider, org.assertj.core.api.AssertionErrorCollector, org.assertj.core.api.AfterAssertionErrorCollected, org.assertj.core.api.BDDSoftAssertionsProvider, org.assertj.core.api.Java6BDDSoftAssertionsProvider

Same as SoftAssertions, but with the following differences:
First, it's a junit rule, which can be used without having to call 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.

Field Summary

Inherited from org.assertj.core.api.AbstractSoftAssertions:
proxies

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from org.assertj.core.api.AbstractSoftAssertions:
assertAllassertAllerrorsCollectedfailfailfailfailfailfailBecauseExceptionWasNotThrownproxyshouldHaveThrown

Constructor Detail

JUnitBDDSoftAssertionsback to summary
public JUnitBDDSoftAssertions()