public class JUnitJupiterSoftAssertions extends AbstractStandardSoftAssertions implements org.junit.jupiter.api.extension.AfterEachCallback
SoftAssertions
, but with the following differences: 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.proxies
Constructor and Description |
---|
JUnitJupiterSoftAssertions() |
Modifier and Type | Method and Description |
---|---|
void |
afterEach(org.junit.jupiter.api.extension.ExtensionContext extensionContext) |
assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat
assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThatCode, assertThatObject, assertThatThrownBy, assertThatThrownBy
decorateErrorsCollected, errorsCollected, fail, fail, fail, failBecauseExceptionWasNotThrown, proxy, shouldHaveThrown, wasSuccess
Copyright © 2014–2019 AssertJ. All rights reserved.