| Modifier and Type | Field and Description |
|---|---|
| private static final AssertionErrorCreator | |
| pack-priv final SoftProxies |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public static void | |
| public void | assertAll()
Implements org. |
| public List | Returns: a copy of list of soft assertions collected errors.Returns a copy of list of soft assertions collected errors. |
| public < dummy return value type T> T | |
| public < dummy return value type T> T | Returns: nothing, it's just to be used indoSomething(optional.orElseGet(() -> softly.fail()));.Fails with an empty message to be used in code like:
|
| public < dummy return value type T> T | Returns: nothing, it's just to be used indoSomething(optional.orElseGet(() -> softly.fail("boom")));.error message. failureMessage, Object... Arguments referenced by the format specifiers in the format string. args)Fails with the given message built like |
| public < dummy return value type T> T | |
| public < dummy return value type T> T | |
| public void | failBecauseExceptionWasNotThrown(Class<? extends Throwable>
the Throwable class that was expected to be thrown. throwableClass)Fails with a message explaining that a |
| public <SELF extends Assert | proxy(Class<SELF>
Class instance for the assertion type. assertClass, Class<ACTUAL> Class instance for the type of the object-under-test. actualClass, ACTUAL The actual object-under-test. actual)Implements org. |
| public void | shouldHaveThrown(Class<? extends Throwable>
the Throwable class that was expected to be thrown. throwableClass)Fails with a message explaining that a |
| ASSERTION_ERROR_CREATOR | back to summary |
|---|---|
| private static final AssertionErrorCreator ASSERTION_ERROR_CREATOR | |
| proxies | back to summary |
|---|---|
| pack-priv final SoftProxies proxies | |
| AbstractSoftAssertions | back to summary |
|---|---|
| protected AbstractSoftAssertions() | |
| assertAll | back to summary |
|---|---|
| public static void assertAll(AssertionErrorCollector collector) | |
| assertAll | back to summary |
|---|---|
| public void assertAll() Implements org. Doc from org. Verifies that no soft assertions have failed.
| |
| errorsCollected | back to summary |
|---|---|
| public List Returns a copy of list of soft assertions collected errors. | |
| fail | back to summary |
|---|---|
| public <T> T fail(String failureMessage) Fails with the given message.
| |
| fail | back to summary |
|---|---|
| public <T> T fail() Fails with an empty message to be used in code like:
| |
| fail | back to summary |
|---|---|
| public <T> T fail(String failureMessage, Object... args) Fails with the given message built like
| |
| fail | back to summary |
|---|---|
| public <T> T fail(String failureMessage, Throwable realCause) Fails with the given message and with the
| |
| fail | back to summary |
|---|---|
| public <T> T fail(Throwable realCause) Fails with the Example:
| |
| failBecauseExceptionWasNotThrown | back to summary |
|---|---|
| public void failBecauseExceptionWasNotThrown(Class<? extends Throwable> throwableClass) Fails with a message explaining that a
| |
| proxy | back to summary |
|---|---|
| public <SELF extends Assert Implements org. Doc from org. Creates a proxied assertion class of the given type. The returned value is an assertion object compatible with the supplied assertion class, but instead of throwing errors it will collect them and store.
| |
| shouldHaveThrown | back to summary |
|---|---|
| public void shouldHaveThrown(Class<? extends Throwable> throwableClass) Fails with a message explaining that a
| |