java.lang.Object
java.lang.Throwable
java.lang.Error
java.lang.AssertionError
org.opentest4j.MultipleFailuresError
- All Implemented Interfaces:
Serializable
MultipleFailuresError
is an AssertionError
that aggregates
multiple failures thrown in a given context (i.e., typically within the
invocation of a single test).- Since:
- 1.0
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMultipleFailuresError
(String heading, List<? extends Throwable> failures) Constructs anMultipleFailuresError
with the supplied heading and failures. -
Method Summary
Modifier and TypeMethodDescriptionReturns the list of failures contained in this error.boolean
Returns whether this error contains any failures.private static boolean
private static String
nullSafeMessage
(Throwable failure) private static String
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
EOL
-
heading
-
failures
-
-
Constructor Details
-
MultipleFailuresError
Constructs anMultipleFailuresError
with the supplied heading and failures.- Parameters:
heading
- the message heading; a default value will be used ifnull
or blankfailures
- the list of failures; must not benull
or containnull
elements
-
-
Method Details
-
getMessage
- Overrides:
getMessage
in classThrowable
-
getFailures
Returns the list of failures contained in this error. -
hasFailures
public boolean hasFailures()Returns whether this error contains any failures. -
isBlank
-
pluralize
-
nullSafeMessage
-