org.junit.runners.model.InitializationError Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of junit-dep Show documentation
Show all versions of junit-dep Show documentation
JUnit is a regression testing framework written by Erich Gamma and Kent Beck.
It is used by the developer who implements unit tests in Java.
package org.junit.runners.model;
import java.util.Arrays;
import java.util.List;
/**
* Represents one or more problems encountered while initializing a Runner
*/
public class InitializationError extends Exception {
private static final long serialVersionUID= 1L;
private final List fErrors;
/**
* Construct a new {@code InitializationError} with one or more
* errors {@code errors} as causes
*/
public InitializationError(List errors) {
fErrors= errors;
}
/**
* Construct a new {@code InitializationError} with one cause
* with message {@code string}
*/
public InitializationError(String string) {
this(Arrays.asList(new Exception(string)));
}
/**
* Returns one or more Throwables that led to this initialization error.
*/
public List getCauses() {
return fErrors;
}
}