JUnit 4.13.2 Source Code Files

JUnit Source Code Files are provided in the source package file, junit-4.13.2-sources.jar.

You can browse JUnit Source Code files below:

✍: FYIcenter.com

org/junit/validator/AnnotationValidator.java

package org.junit.validator;

import org.junit.runners.model.FrameworkField;
import org.junit.runners.model.FrameworkMethod;
import org.junit.runners.model.TestClass;

import static java.util.Collections.emptyList;

import java.util.List;

/**
 * Validates annotations on classes and methods. To be validated,
 * an annotation should be annotated with {@link ValidateWith}
 *
 * Instances of this class are shared by multiple test runners, so they should
 * be immutable and thread-safe.
 *
 * @since 4.12
 */
public abstract class AnnotationValidator {

    private static final List<Exception> NO_VALIDATION_ERRORS = emptyList();

    /**
     * Validates annotation on the given class.
     *
     * @param testClass that is being validated
     * @return A list of exceptions. Default behavior is to return an empty list.
     *
     * @since 4.12
     */
    public List<Exception> validateAnnotatedClass(TestClass testClass) {
        return NO_VALIDATION_ERRORS;
    }

    /**
     * Validates annotation on the given field.
     *
     * @param field that is being validated
     * @return A list of exceptions. Default behavior is to return an empty list.
     *
     * @since 4.12
     */
    public List<Exception> validateAnnotatedField(FrameworkField field) {
        return NO_VALIDATION_ERRORS;

    }

    /**
     * Validates annotation on the given method.
     *
     * @param method that is being validated
     * @return A list of exceptions. Default behavior is to return an empty list.
     *
     * @since 4.12
     */
    public List<Exception> validateAnnotatedMethod(FrameworkMethod method) {
        return NO_VALIDATION_ERRORS;
    }
}

org/junit/validator/AnnotationValidator.java

 

Or download all of them as a single archive file:

File name: junit-4.13.2-sources.jar
File size: 234540 bytes
Release date: 2021-02-13
Download 

 

Download and Install junit-4.12.jar

Download and Install junit-4.13.2.jar

Download and Install JUnit (Java Unit) Testing

⇑⇑ FAQ for JUnit (Java Unit) Testing

2016-03-28, 11077👍, 0💬