Package org.opentest4j
Class MultipleFailuresError
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Error
-
- java.lang.AssertionError
-
- org.opentest4j.MultipleFailuresError
-
- All Implemented Interfaces:
Serializable
public class MultipleFailuresError extends AssertionError
MultipleFailuresErroris anAssertionErrorthat aggregates multiple failures thrown in a given context (i.e., typically within the invocation of a single test).- Since:
- 1.0
- Author:
- Johannes Link, Sam Brannen, Marc Philipp
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MultipleFailuresError(String heading, List<? extends Throwable> failures)Constructs anMultipleFailuresErrorwith the supplied heading and failures.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Throwable>getFailures()Returns the list of failures contained in this error.StringgetMessage()booleanhasFailures()Returns whether this error contains any failures.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
MultipleFailuresError
public MultipleFailuresError(String heading, List<? extends Throwable> failures)
Constructs anMultipleFailuresErrorwith the supplied heading and failures.- Parameters:
heading- the message heading; a default value will be used ifnullor blankfailures- the list of failures; must not benullor containnullelements
-
-
Method Detail
-
getMessage
public String getMessage()
- Overrides:
getMessagein classThrowable
-
getFailures
public List<Throwable> getFailures()
Returns the list of failures contained in this error.
-
hasFailures
public boolean hasFailures()
Returns whether this error contains any failures.
-
-