Top Fields Constructors Methods
org.assertj.core.api

public Class JUnitJupiterBDDSoftAssertions

extends AbstractSoftAssertions
implements BDDSoftAssertionsProvider, AfterEachCallback
Class Inheritance
All Implemented Interfaces
org.junit.jupiter.api.extension.AfterEachCallback, org.junit.jupiter.api.extension.Extension, org.assertj.core.api.BDDSoftAssertionsProvider, org.assertj.core.api.Java6BDDSoftAssertionsProvider, 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 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.

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

JUnitJupiterBDDSoftAssertionsback to summary
public JUnitJupiterBDDSoftAssertions()

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