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 voidaddErrorMessage(List<Exception> errors, Class<?> clazz) Adds toerrorsa 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 toerrorsa throwable for each problem detected. Looks forBeforeClass,AfterClass,BeforeandAfterannotations.- Overrides:
validateAnnotatedMethodin classAnnotationValidator- Parameters:
method- the method that is being validated- Returns:
- A list of exceptions detected
- Since:
- 4.12
-
addErrorMessage
-