MultipleFailureException (JUnit API)
Date: 2011-08-22

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.junit.runners.model
Class MultipleFailureException

    java.lang.Object
      java.lang.Throwable
          java.lang.Exception
              org.junit.runners.model.MultipleFailureException

All Implemented Interfaces:
  Serializable

    public class MultipleFailureException

extends Exception

Collects multiple `Throwable`s into one exception.

See Also:
  Serialized Form

Constructor Summary
`MultipleFailureException(List<Throwable> errors)`

Method Summary
`static void` | `assertEmpty(List<Throwable> errors)` Asserts that a list of throwables is empty.
`List<Throwable>` | `getFailures()`
`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`

Constructor Detail

### MultipleFailureException

    public MultipleFailureException(List<Throwable> errors)

Method Detail

### getFailures

    public List<Throwable> getFailures()

### getMessage

    public String getMessage()

  Overrides:
    `getMessage` in class `Throwable`

### assertEmpty

    public static void assertEmpty(List<Throwable> errors)
                            throws 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:
    `Throwable` - if the list is not empty

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD