Top Fields Constructors Methods
org.assertj.core.api

public Class JUnitJupiterSoftAssertions

extends AbstractSoftAssertions
implements StandardSoftAssertionsProvider, AfterEachCallback
Class Inheritance
All Implemented Interfaces
org.junit.jupiter.api.extension.AfterEachCallback, org.junit.jupiter.api.extension.Extension, org.assertj.core.api.StandardSoftAssertionsProvider, org.assertj.core.api.Java6StandardSoftAssertionsProvider, org.assertj.core.api.SoftAssertionsProvider, org.assertj.core.api.AssertionErrorCollector, org.assertj.core.api.AfterAssertionErrorCollected
Annotations
@Deprecated
Imports
java.util.List, org.assertj.core.api.junit.jupiter.SoftAssertionsExtension, org.assertj.core.error.AssertionErrorCreator, org.junit.jupiter.api.extension.AfterEachCallback, .ExtensionContext

Deprecated

use SoftAssertionsExtension instead. Same as SoftAssertions, but with the following differences:
First, it's a JUnit Jupiter extension, which can be used without having to call assertAll(), example:

 public class SoftlyTest {

    @RegisterExtension
    public final JUnitJupiterSoftAssertions softly = new JUnitJupiterSoftAssertions();

    @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

Modifier and TypeField and Description
private AssertionErrorCreator
Inherited from org.assertj.core.api.AbstractSoftAssertions:
proxies

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
afterEach(ExtensionContext
the current extension context; never null
extensionContext
)

Implements org.junit.jupiter.api.extension.AfterEachCallback.afterEach.

Callback that is invoked after an individual test and any user-defined teardown methods for that test have been executed.
Inherited from org.assertj.core.api.AbstractSoftAssertions:
assertAllassertAllerrorsCollectedfailfailfailfailfailfailBecauseExceptionWasNotThrownproxyshouldHaveThrown

Field Detail

assertionErrorCreatorback to summary
private AssertionErrorCreator assertionErrorCreator

Constructor Detail

JUnitJupiterSoftAssertionsback to summary
public JUnitJupiterSoftAssertions()

Method Detail

afterEachback to summary
public void afterEach(ExtensionContext extensionContext)

Implements org.junit.jupiter.api.extension.AfterEachCallback.afterEach.

Doc from org.junit.jupiter.api.extension.AfterEachCallback.afterEach.

Callback that is invoked after an individual test and any user-defined teardown methods for that test have been executed.

Parameters
extensionContext:ExtensionContext

the current extension context; never null

Annotations
@Override