com.atlassian.jira.functest.framework.util.junit
Class AnnotatedDescription

java.lang.Object
  extended by com.atlassian.jira.functest.framework.util.junit.AnnotatedDescription

public class AnnotatedDescription
extends Object

Wrapper around Description to resolve its annotations.

Since:
v4.4

Constructor Summary
AnnotatedDescription(org.junit.runner.Description description)
           
 
Method Summary
<A extends Annotation>
A
getAnnotationFromTestClass(Class<A> annotation)
           
<A extends Annotation>
A
getAnnotationFromTestMethod(Class<A> annotation)
           
<A extends Annotation>
boolean
hasAnnotation(Class<A> annotation)
          Checks whether the underlying description has given annotation - itself or on its parent suite (only if this description is a test).
 boolean isAnnotatedWith(Class<? extends Annotation> annotation)
           
 boolean isClassAnnotated(Class<? extends Annotation> annotation)
           
 boolean isMethodAnnotated(Class<? extends Annotation> annotation)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotatedDescription

public AnnotatedDescription(org.junit.runner.Description description)
Method Detail

hasAnnotation

public <A extends Annotation> boolean hasAnnotation(Class<A> annotation)
Checks whether the underlying description has given annotation - itself or on its parent suite (only if this description is a test).

Returns:
true if this description is annotated with given annotation (test method or class)

getAnnotationFromTestMethod

public <A extends Annotation> A getAnnotationFromTestMethod(Class<A> annotation)

getAnnotationFromTestClass

public <A extends Annotation> A getAnnotationFromTestClass(Class<A> annotation)

isAnnotatedWith

public boolean isAnnotatedWith(Class<? extends Annotation> annotation)

isMethodAnnotated

public boolean isMethodAnnotated(Class<? extends Annotation> annotation)

isClassAnnotated

public boolean isClassAnnotated(Class<? extends Annotation> annotation)


Copyright © 2002-2012 Atlassian. All Rights Reserved.