org.junit.runners.model
Class InvalidTestClassError

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.junit.runners.model.InitializationError
              extended by org.junit.runners.model.InvalidTestClassError
All Implemented Interfaces:
Serializable

public class InvalidTestClassError
extends InitializationError

Thrown by Runners 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

Constructor Summary
InvalidTestClassError(Class<?> offendingTestClass, List<Throwable> validationErrors)
           
 
Method Summary
 String getMessage()
           
 
Methods inherited from class org.junit.runners.model.InitializationError
getCauses
 
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

InvalidTestClassError

public InvalidTestClassError(Class<?> offendingTestClass,
                             List<Throwable> validationErrors)
Method Detail

getMessage

public String getMessage()
Overrides:
getMessage in class Throwable
Returns:
a message with a list of all of the validation errors


Copyright © 2002–2021 JUnit. All rights reserved.