org.junit.runners.model
Class MultipleFailureException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.junit.runners.model.MultipleFailureException
- All Implemented Interfaces:
- java.io.Serializable
public class MultipleFailureException
- extends java.lang.Exception
Collects multiple Throwables into one exception.
- See Also:
- Serialized Form
|
Method Summary |
static void |
assertEmpty(java.util.List<java.lang.Throwable> errors)
Asserts that a list of throwables is empty. |
java.util.List<java.lang.Throwable> |
getFailures()
|
java.lang.String |
getMessage()
|
| Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
MultipleFailureException
public MultipleFailureException(java.util.List<java.lang.Throwable> errors)
getFailures
public java.util.List<java.lang.Throwable> getFailures()
getMessage
public java.lang.String getMessage()
- Overrides:
getMessage in class java.lang.Throwable
assertEmpty
public static void assertEmpty(java.util.List<java.lang.Throwable> errors)
throws java.lang.Throwable
- Asserts that a list of throwables is empty. If it isn't empty,
will throw
MultipleFailureException (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:
java.lang.Throwable - if the list is not empty