Package 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
- Direct Known Subclasses:
MultipleFailureException
public class MultipleFailureException extends java.lang.ExceptionCollects multipleThrowables into one exception.- Since:
- 4.9
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MultipleFailureException(java.util.List<java.lang.Throwable> errors)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidassertEmpty(java.util.List<java.lang.Throwable> errors)Asserts that a list of throwables is empty.java.util.List<java.lang.Throwable>getFailures()java.lang.StringgetMessage()voidprintStackTrace()voidprintStackTrace(java.io.PrintStream s)voidprintStackTrace(java.io.PrintWriter s)
-
-
-
Method Detail
-
getFailures
public java.util.List<java.lang.Throwable> getFailures()
-
getMessage
public java.lang.String getMessage()
- Overrides:
getMessagein classjava.lang.Throwable
-
printStackTrace
public void printStackTrace()
- Overrides:
printStackTracein classjava.lang.Throwable
-
printStackTrace
public void printStackTrace(java.io.PrintStream s)
- Overrides:
printStackTracein classjava.lang.Throwable
-
printStackTrace
public void printStackTrace(java.io.PrintWriter s)
- Overrides:
printStackTracein classjava.lang.Throwable
-
assertEmpty
public static void assertEmpty(java.util.List<java.lang.Throwable> errors) throws java.lang.ExceptionAsserts 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:
java.lang.Exception- or Error if the list is not empty
-
-