com.atlassian.jira.functest.framework.util.junit
Class AnnotatedDescription
java.lang.Object
com.atlassian.jira.functest.framework.util.junit.AnnotatedDescription
public class AnnotatedDescription
- extends Object
Wrapper around Description
to resolve its annotations.
- Since:
- v4.4
AnnotatedDescription
public AnnotatedDescription(org.junit.runner.Description description)
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)
getAnnotation
public <A extends Annotation> A getAnnotation(Class<A> annotation)
- Gets annotation of given type for this description, or
null
if this description is not annotated
with annotation. Looks up both test method and test class (if applicable).
- Type Parameters:
A
- annotation type- Parameters:
annotation
- annotation to find
- Returns:
- annotation instance for this description, or
null
if not found
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)
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2002-2014 Atlassian. All Rights Reserved.