| Access | Constructor and Description |
|---|---|
| private | Fail()
Since all its methods are static and the class is final, there is no point on creating a new instance of it. |
| Modifier and Type | Method and Description |
|---|---|
| public static < dummy return value type T> T | Returns: nothing, it's just to be used indoSomething(optional.orElseGet(() -> fail("boom")));.error message. failureMessage)Throws an |
| public static < dummy return value type T> T | Returns: nothing, it's just to be used indoSomething(optional.orElseGet(() -> fail()));.Throws an
|
| public static < dummy return value type T> T | Returns: nothing, it's just to be used indoSomething(optional.orElseGet(() -> fail("b%s", ""oom)));.error message. failureMessage, Object... Arguments referenced by the format specifiers in the format string. args)Throws an |
| public static < dummy return value type T> T | Returns: nothing, it's just to be used indoSomething(optional.orElseGet(() -> fail("boom", cause)));.the description of the failed assertion. It can be failureMessage, Throwable null.cause of the error. realCause)Throws an |
| public static < dummy return value type T> T | Returns: nothing, it's just to be used indoSomething(optional.orElseGet(() -> fail(cause)));.cause of the error. realCause)Throws an |
| public static < dummy return value type T> T | Returns: nothing, it's just to be used indoSomething(optional.orElseGet(() -> failBecauseExceptionWasNotThrown(IOException.class)));.the Throwable class that was expected to be thrown. throwableClass)Throws an |
| public static void | setRemoveAssertJRelatedElementsFromStackTrace(boolean
flag. removeAssertJRelatedElementsFromStackTrace)Sets whether we remove elements related to AssertJ from assertion error stack trace. |
| public static < dummy return value type T> T | Returns: nothing, it's just to be used indoSomething(optional.orElseGet(() -> shouldHaveThrown(IOException.class)));.the Throwable class that was expected to be thrown. throwableClass)Throws an |
| Fail | back to summary |
|---|---|
| private Fail() Since all its methods are static and the class is final, there is no point on creating a new instance of it. | |
| fail | back to summary |
|---|---|
| public static <T> T fail(String failureMessage) Throws an
| |
| fail | back to summary |
|---|---|
| public static <T> T fail() Throws an
| |
| fail | back to summary |
|---|---|
| public static <T> T fail(String failureMessage, Object... args) Throws an
| |
| fail | back to summary |
|---|---|
| public static <T> T fail(String failureMessage, Throwable realCause) Throws an
| |
| fail | back to summary |
|---|---|
| public static <T> T fail(Throwable realCause) Throws an
| |
| failBecauseExceptionWasNotThrown | back to summary |
|---|---|
| public static <T> T failBecauseExceptionWasNotThrown(Class<? extends Throwable> throwableClass) Throws an
| |
| setRemoveAssertJRelatedElementsFromStackTrace | back to summary |
|---|---|
| public static void setRemoveAssertJRelatedElementsFromStackTrace(boolean removeAssertJRelatedElementsFromStackTrace) Sets whether we remove elements related to AssertJ from assertion error stack trace.
| |
| shouldHaveThrown | back to summary |
|---|---|
| public static <T> T shouldHaveThrown(Class<? extends Throwable> throwableClass) Throws an
| |