Package org.junit.runners.model
Class InvalidTestClassError
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.junit.runners.model.InitializationError
-
- org.junit.runners.model.InvalidTestClassError
-
- All Implemented Interfaces:
java.io.Serializable
public class InvalidTestClassError extends InitializationError
Thrown byRunner
s in case the class under test is not valid.Its message conveniently lists all of the validation errors.
- Since:
- 4.13
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
message
private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description InvalidTestClassError(java.lang.Class<?> offendingTestClass, java.util.List<java.lang.Throwable> validationErrors)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.lang.String
createMessage(java.lang.Class<?> testClass, java.util.List<java.lang.Throwable> validationErrors)
java.lang.String
getMessage()
-
Methods inherited from class org.junit.runners.model.InitializationError
getCauses
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
message
private final java.lang.String message
-
-
Method Detail
-
createMessage
private static java.lang.String createMessage(java.lang.Class<?> testClass, java.util.List<java.lang.Throwable> validationErrors)
-
getMessage
public java.lang.String getMessage()
- Overrides:
getMessage
in classjava.lang.Throwable
- Returns:
- a message with a list of all of the validation errors
-
-