Class AnnotatedMethodTemplate<A extends Annotation>
- java.lang.Object
-
- com.atlassian.confluence.test.util.AnnotatedMethodTemplate<A>
-
- Type Parameters:
A
- the annotation used for configuring the rule
- All Implemented Interfaces:
org.junit.rules.TestRule
- Direct Known Subclasses:
Log4J2Logger
public abstract class AnnotatedMethodTemplate<A extends Annotation> extends Object implements org.junit.rules.TestRule
Template for writing rules which read configuration from a method annotation.- Since:
- 7.20
-
-
Field Summary
Fields Modifier and Type Field Description protected Class<A>
annotationClass
protected Class
testClass
-
Constructor Summary
Constructors Constructor Description AnnotatedMethodTemplate(Class testClass)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description org.junit.runners.model.Statement
apply(org.junit.runners.model.Statement statement, org.junit.runner.Description description)
protected abstract org.junit.runners.model.Statement
applyForAnnotation(org.junit.runners.model.Statement statement, org.junit.runner.Description description, A annotation)
-
-
-
Field Detail
-
testClass
protected final Class testClass
-
annotationClass
protected final Class<A extends Annotation> annotationClass
-
-
Constructor Detail
-
AnnotatedMethodTemplate
public AnnotatedMethodTemplate(Class testClass)
-
-
Method Detail
-
apply
public final org.junit.runners.model.Statement apply(org.junit.runners.model.Statement statement, org.junit.runner.Description description)
- Specified by:
apply
in interfaceorg.junit.rules.TestRule
-
applyForAnnotation
protected abstract org.junit.runners.model.Statement applyForAnnotation(org.junit.runners.model.Statement statement, org.junit.runner.Description description, A annotation)
-
-