类 AnnotationValidator
- java.lang.Object
- org.junit.validator.AnnotationValidator
- 直接已知子类:
CategoryValidator
public abstract class AnnotationValidator extends Object
Validates annotations on classes and methods. To be validated, an annotation should be annotated withValidateWith
Instances of this class are shared by multiple test runners, so they should be immutable and thread-safe.- 从以下版本开始:
- 4.12
构造器概要
构造器 构造器 说明 AnnotationValidator()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 List<Exception>
validateAnnotatedClass(TestClass testClass)
Validates annotation on the given class.List<Exception>
validateAnnotatedField(FrameworkField field)
Validates annotation on the given field.List<Exception>
validateAnnotatedMethod(FrameworkMethod method)
Validates annotation on the given method.
构造器详细资料
AnnotationValidator
public AnnotationValidator()
方法详细资料
validateAnnotatedClass
public List<Exception> validateAnnotatedClass(TestClass testClass)
Validates annotation on the given class.- 参数:
testClass
- that is being validated- 返回:
- A list of exceptions. Default behavior is to return an empty list.
- 从以下版本开始:
- 4.12
validateAnnotatedField
public List<Exception> validateAnnotatedField(FrameworkField field)
Validates annotation on the given field.- 参数:
field
- that is being validated- 返回:
- A list of exceptions. Default behavior is to return an empty list.
- 从以下版本开始:
- 4.12
validateAnnotatedMethod
public List<Exception> validateAnnotatedMethod(FrameworkMethod method)
Validates annotation on the given method.- 参数:
method
- that is being validated- 返回:
- A list of exceptions. Default behavior is to return an empty list.
- 从以下版本开始:
- 4.12