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
Collects multiple
Throwables into one exception.- Since:
- 4.9
- See Also:
-
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
-
Constructor Details
-
MultipleFailureException
-
-
Method Details
-
getFailures
-
getMessage
- Overrides:
getMessagein classThrowable
-
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
-