Constructor and Description |
---|
TestClass(Class<?> klass)
Creates a
TestClass wrapping klass . |
Modifier and Type | Method and Description |
---|---|
List<FrameworkField> |
getAnnotatedFields(Class<? extends Annotation> annotationClass)
Returns, efficiently, all the non-overridden fields in this class and its
superclasses that are annotated with
annotationClass . |
<T> List<T> |
getAnnotatedFieldValues(Object test,
Class<? extends Annotation> annotationClass,
Class<T> valueClass) |
List<FrameworkMethod> |
getAnnotatedMethods(Class<? extends Annotation> annotationClass)
Returns, efficiently, all the non-overridden methods in this class and
its superclasses that are annotated with
annotationClass . |
<T> List<T> |
getAnnotatedMethodValues(Object test,
Class<? extends Annotation> annotationClass,
Class<T> valueClass) |
Annotation[] |
getAnnotations()
Returns the annotations on this class
|
Class<?> |
getJavaClass()
Returns the underlying Java class.
|
String |
getName()
Returns the class's name.
|
Constructor<?> |
getOnlyConstructor()
Returns the only public constructor in the class, or throws an
AssertionError if there are more or less than one. |
boolean |
isANonStaticInnerClass() |
public List<FrameworkMethod> getAnnotatedMethods(Class<? extends Annotation> annotationClass)
annotationClass
.public List<FrameworkField> getAnnotatedFields(Class<? extends Annotation> annotationClass)
annotationClass
.public Class<?> getJavaClass()
public Constructor<?> getOnlyConstructor()
AssertionError
if there are more or less than one.public Annotation[] getAnnotations()
public <T> List<T> getAnnotatedFieldValues(Object test, Class<? extends Annotation> annotationClass, Class<T> valueClass)
public <T> List<T> getAnnotatedMethodValues(Object test, Class<? extends Annotation> annotationClass, Class<T> valueClass)
public boolean isANonStaticInnerClass()
Copyright © 2002-2012 JUnit. All Rights Reserved.