Package org.junit.runners.model
Class MultipleFailureException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.junit.runners.model.MultipleFailureException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
MultipleFailureException
Collects multiple
Throwables into one exception.- Since:
- 4.9
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidassertEmpty(List<Throwable> errors) Asserts that a list of throwables is empty.voidvoidvoidMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
fErrors
-
-
Constructor Details
-
MultipleFailureException
-
-
Method Details
-
getFailures
-
getMessage
- Overrides:
getMessagein classThrowable
-
printStackTrace
public void printStackTrace()- Overrides:
printStackTracein classThrowable
-
printStackTrace
- Overrides:
printStackTracein classThrowable
-
printStackTrace
- Overrides:
printStackTracein classThrowable
-
assertEmpty
Asserts that a list of throwables is empty. If it isn't empty, will throwMultipleFailureException(if there are multiple throwables in the list) or the first element in the list (if there is only one element).- Parameters:
errors- list to check- Throws:
Exception- or Error if the list is not empty
-