Class CategoryValidator
- java.lang.Object
-
- org.junit.validator.AnnotationValidator
-
- org.junit.experimental.categories.CategoryValidator
-
public final class CategoryValidator extends AnnotationValidator
Validates that there are no errors in the use of theCategory
annotation. If there is, aThrowable
object will be added to the list of errors.- Since:
- 4.12
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Set<java.lang.Class<? extends java.lang.annotation.Annotation>>
INCOMPATIBLE_ANNOTATIONS
-
Constructor Summary
Constructors Constructor Description CategoryValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
addErrorMessage(java.util.List<java.lang.Exception> errors, java.lang.Class<?> clazz)
java.util.List<java.lang.Exception>
validateAnnotatedMethod(FrameworkMethod method)
Adds toerrors
a throwable for each problem detected.-
Methods inherited from class org.junit.validator.AnnotationValidator
validateAnnotatedClass, validateAnnotatedField
-
-
-
-
Method Detail
-
validateAnnotatedMethod
public java.util.List<java.lang.Exception> validateAnnotatedMethod(FrameworkMethod method)
Adds toerrors
a throwable for each problem detected. Looks forBeforeClass
,AfterClass
,Before
andAfter
annotations.- Overrides:
validateAnnotatedMethod
in classAnnotationValidator
- Parameters:
method
- the method that is being validated- Returns:
- A list of exceptions detected
- Since:
- 4.12
-
addErrorMessage
private void addErrorMessage(java.util.List<java.lang.Exception> errors, java.lang.Class<?> clazz)
-
-