Class CategoryValidator
java.lang.Object
org.junit.validator.AnnotationValidator
org.junit.experimental.categories.CategoryValidator
Validates that there are no errors in the use of the
Category
annotation. If there is, a Throwable
object will be added to the list
of errors.- Since:
- 4.12
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
addErrorMessage
(List<Exception> errors, Class<?> clazz) Adds toerrors
a throwable for each problem detected.Methods inherited from class org.junit.validator.AnnotationValidator
validateAnnotatedClass, validateAnnotatedField
-
Field Details
-
INCOMPATIBLE_ANNOTATIONS
-
-
Constructor Details
-
CategoryValidator
public CategoryValidator()
-
-
Method Details
-
validateAnnotatedMethod
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
-