Class 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
    • Field Detail

      • INCOMPATIBLE_ANNOTATIONS

        private static final java.util.Set<java.lang.Class<? extends java.lang.annotation.Annotation>> INCOMPATIBLE_ANNOTATIONS
    • 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
      • addErrorMessage

        private void addErrorMessage​(java.util.List<java.lang.Exception> errors,
                                     java.lang.Class<?> clazz)