| Modifier and Type | Field and Description |
|---|---|
| private AssertionErrorCreator | |
| private static final Failures | |
| private static final String | |
| private boolean | printThreadDump
flag indicating that in case of a failure a threaddump is printed out. |
| private boolean | removeAssertJRelatedElementsFromStackTrace
flag indicating whether or not we remove elements related to AssertJ from assertion error stack trace. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| protected String | |
| public void | enablePrintThreadDump()
Set the flag indicating that in case of a failure a threaddump is printed out. |
| public AssertionError | Returns: the created.the Throwable class that was expected to be thrown. throwableClass)Creates a |
| public AssertionError | Returns: the created.contains information about the failed assertion. info, AssertionErrorFactory knows how to create factory)AssertionErrors.
Deprecated
as a consequence of
Creates a AssertionErrorFactory being deprecated.
following this pattern:
|
| public AssertionError | Returns: the created.contains information about the failed assertion. info, ErrorMessageFactory knows how to create detail messages for messageFactory)AssertionErrors.Creates a
|
| public AssertionError | |
| public AssertionError | Returns: the created.the message of the message)AssertionError to create.Creates a |
| public AssertionError | |
| public static Failures | Returns: the singleton instance of this class.Returns the singleton instance of this class. |
| public boolean | Returns: whether or not we remove elements related to AssertJ from assertion error stack trace.Returns whether or not we remove elements related to AssertJ from assertion error stack trace. |
| public void | |
| public void | removeAssertJRelatedElementsFromStackTraceIfNeeded(AssertionError
the assertionError)AssertionError to filter stack trace if option is set.If is |
| public void | setRemoveAssertJRelatedElementsFromStackTrace(boolean
flag removeAssertJRelatedElementsFromStackTrace)Sets whether we remove elements related to AssertJ from assertion error stack trace. |
| public static String |
| assertionErrorCreator | back to summary |
|---|---|
| private AssertionErrorCreator assertionErrorCreator | |
| INSTANCE | back to summary |
|---|---|
| private static final Failures INSTANCE | |
| LINE_SEPARATOR | back to summary |
|---|---|
| private static final String LINE_SEPARATOR | |
| printThreadDump | back to summary |
|---|---|
| private boolean printThreadDump flag indicating that in case of a failure a threaddump is printed out. | |
| removeAssertJRelatedElementsFromStackTrace | back to summary |
|---|---|
| private boolean removeAssertJRelatedElementsFromStackTrace flag indicating whether or not we remove elements related to AssertJ from assertion error stack trace. | |
| Failures | back to summary |
|---|---|
pack-priv Failures()
| |
| assertionErrorMessage | back to summary |
|---|---|
| protected String assertionErrorMessage(AssertionInfo info, ErrorMessageFactory messageFactory) | |
| enablePrintThreadDump | back to summary |
|---|---|
| public void enablePrintThreadDump() Set the flag indicating that in case of a failure a threaddump is printed out. | |
| expectedThrowableNotThrown | back to summary |
|---|---|
| public AssertionError expectedThrowableNotThrown(Class<? extends Throwable> throwableClass) Creates a
| |
| failure | back to summary |
|---|---|
| public AssertionError failure(AssertionInfo info, AssertionErrorFactory factory)
Deprecated as a consequence of Creates a
| |
| failure | back to summary |
|---|---|
| public AssertionError failure(AssertionInfo info, ErrorMessageFactory messageFactory) Creates a
| |
| failure | back to summary |
|---|---|
| public AssertionError failure(AssertionInfo info, ErrorMessageFactory messageFactory, Object actual, Object expected) | |
| failure | back to summary |
|---|---|
| public AssertionError failure(String message) Creates a
It filters the AssertionError stack trace by default, to have full stack trace use
| |
| failureIfErrorMessageIsOverridden | back to summary |
|---|---|
| public AssertionError failureIfErrorMessageIsOverridden(AssertionInfo info) | |
| instance | back to summary |
|---|---|
| public static Failures instance() Returns the singleton instance of this class.
| |
| isRemoveAssertJRelatedElementsFromStackTrace | back to summary |
|---|---|
| public boolean isRemoveAssertJRelatedElementsFromStackTrace() Returns whether or not we remove elements related to AssertJ from assertion error stack trace.
| |
| printThreadDumpIfNeeded | back to summary |
|---|---|
| public void printThreadDumpIfNeeded() | |
| removeAssertJRelatedElementsFromStackTraceIfNeeded | back to summary |
|---|---|
| public void removeAssertJRelatedElementsFromStackTraceIfNeeded(AssertionError assertionError) If is See example below :
Method is public because we need to call it from ShouldBeEqual#newAssertionError(Description, org. that is building a junit ComparisonFailure by reflection.
| |
| setRemoveAssertJRelatedElementsFromStackTrace | back to summary |
|---|---|
| public void setRemoveAssertJRelatedElementsFromStackTrace(boolean removeAssertJRelatedElementsFromStackTrace) Sets whether we remove elements related to AssertJ from assertion error stack trace.
| |
| threadDumpDescription | back to summary |
|---|---|
| public static String threadDumpDescription() | |