CategoryValidator (JUnit API)
Date: 2018-08-04

org.junit.experimental.categories

## 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 the `Category` annotation. If there is, a `Throwable` object will be added to the list of errors.
  Since:
    4.12

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CategoryValidator()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.List<java.lang.Exception>` | `validateAnnotatedMethod(FrameworkMethod method)` Adds to `errors` a throwable for each problem detected.

    - ### Methods inherited from class org.junit.validator.AnnotationValidator

      `validateAnnotatedClass, validateAnnotatedField`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CategoryValidator

          public CategoryValidator()

  - ### Method Detail

    - #### validateAnnotatedMethod

          public java.util.List<java.lang.Exception> validateAnnotatedMethod(FrameworkMethod method)

      Adds to `errors` a throwable for each problem detected. Looks for `BeforeClass`, `AfterClass`, `Before` and `After` annotations.
      Overrides:
        `validateAnnotatedMethod` in class `AnnotationValidator`
      Parameters:
        `method` - the method that is being validated
      Returns:
        A list of exceptions detected
      Since:
        4.12