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

public Class JUnitSoftAssertions

extends AbstractSoftAssertions
implements StandardSoftAssertionsProvider, 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.StandardSoftAssertionsProvider, org.assertj.core.api.Java6StandardSoftAssertionsProvider

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 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.

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

JUnitSoftAssertionsback to summary
public JUnitSoftAssertions()