AbstractFilter


public abstract class AbstractFilter extends Filter


Helper parent class for Filter that allows suites to run if any child matches.

Summary

Public constructors

Public methods

boolean
shouldRun(Description description)

Protected methods

abstract boolean

Determine if given test description matches filter.

List<Annotation>

Get a list of class annotations that are annotated with @CustomFilter with this class as the filter class.

List<Annotation>

Get a list of method annotations that are annotated with @CustomFilter with this class as the filter class.

Inherited Constants

From org.junit.runner.manipulation.Filter
static final Filter

Inherited methods

From org.junit.runner.manipulation.Filter
void
apply(Object child)
abstract String
Filter
intersect(Filter second)
static Filter
matchMethodDescription(Description desiredDescription)

Public constructors

AbstractFilter

public AbstractFilter()

Public methods

shouldRun

public boolean shouldRun(Description description)

Protected methods

evaluateTest

protected abstract boolean evaluateTest(Description description)

Determine if given test description matches filter.

Parameters
Description description

the Description describing the test

Returns
boolean

true if matched

getClassAnnotations

protected List<AnnotationgetClassAnnotations(Description description)

Get a list of class annotations that are annotated with @CustomFilter with this class as the filter class.

Parameters
Description description

the Description describing the test

Returns
List<Annotation>

a list of annotations on the test class that are handled by this filter

getMethodAnnotations

protected List<AnnotationgetMethodAnnotations(Description description)

Get a list of method annotations that are annotated with @CustomFilter with this class as the filter class.

Parameters
Description description

the Description describing the test

Returns
List<Annotation>

a list of annotations on methods that are handled by this filter