public class

AnnotatedDescription

extends Object
java.lang.Object
   ↳ com.atlassian.jira.functest.framework.util.junit.AnnotatedDescription

Class Overview

Wrapper around org.junit.runner.Description to resolve its annotations.

Summary

Public Constructors
AnnotatedDescription(Description description)
Public Methods
<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.
<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)
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public AnnotatedDescription (Description description)

Public Methods

public 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).

Parameters
annotation annotation to find
Returns
  • annotation instance for this description, or null if not found

public A getAnnotationFromTestClass (Class<A> annotation)

public A getAnnotationFromTestMethod (Class<A> annotation)

public 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)

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

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

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

public String toString ()