com.atlassian.confluence.util.test.rules
Class AnnotatedMethodTemplate<A extends java.lang.annotation.Annotation>

java.lang.Object
  extended by com.atlassian.confluence.util.test.rules.AnnotatedMethodTemplate<A>
Type Parameters:
A - the annotation used for configuring the rule
All Implemented Interfaces:
org.junit.rules.TestRule
Direct Known Subclasses:
Log4JLogger, SystemProperties

public abstract class AnnotatedMethodTemplate<A extends java.lang.annotation.Annotation>
extends java.lang.Object
implements org.junit.rules.TestRule

Template for writing rules which read configuration from a method annotation.

Since:
5.4

Field Summary
protected  java.lang.Class<A> annotationClass
           
protected  java.lang.Class testClass
           
 
Constructor Summary
AnnotatedMethodTemplate(java.lang.Class testClass)
           
 
Method Summary
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

testClass

protected final java.lang.Class testClass

annotationClass

protected final java.lang.Class<A extends java.lang.annotation.Annotation> annotationClass
Constructor Detail

AnnotatedMethodTemplate

public AnnotatedMethodTemplate(java.lang.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 interface org.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)


Copyright © 2003-2014 Atlassian. All Rights Reserved.