Package net.thucydides.core.annotations
Class TestAnnotations
java.lang.Object
net.thucydides.core.annotations.TestAnnotations
public class TestAnnotations
extends java.lang.Object
Utility class used to help process annotations on tests and test steps.
-
Method Summary
Modifier and Type Method Description static TestAnnotations
forClass(java.lang.Class<?> testClass)
java.util.List<TestTag>
getAllTags()
java.util.Optional<java.lang.String>
getAnnotatedIssueForMethod(java.lang.String methodName)
Return a list of the issues mentioned in the Issue annotation of this method.java.lang.String
getAnnotatedIssueForTestCase(java.lang.Class<?> testCase)
java.lang.String[]
getAnnotatedIssuesForMethod(java.lang.String methodName)
java.lang.String[]
getAnnotatedIssuesForTestCase(java.lang.Class<?> testCase)
java.util.Optional<java.lang.String>
getAnnotatedTitleForMethod(java.lang.String methodName)
java.util.Optional<java.lang.String>
getAnnotatedVersionForMethod(java.lang.String methodName)
java.lang.String
getAnnotatedVersionForTestCase(java.lang.Class<?> testCase)
java.util.List<TestTag>
getClassTags()
java.util.List<TestTag>
getTagsForMethod(java.lang.String methodName)
java.util.List<java.lang.String>
getTestMethodNames()
static boolean
isAnExampleStep(java.lang.reflect.Method method)
static boolean
isIgnored(java.lang.reflect.Method method)
boolean
isIgnored(java.lang.String methodName)
static boolean
isPending(java.lang.reflect.Method method)
boolean
isPending(java.lang.String methodName)
static boolean
shouldSkipNested(java.lang.reflect.Method method)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
forClass
-
getAnnotatedTitleForMethod
public java.util.Optional<java.lang.String> getAnnotatedTitleForMethod(java.lang.String methodName) -
isPending
public boolean isPending(java.lang.String methodName) -
isPending
public static boolean isPending(java.lang.reflect.Method method) -
isIgnored
public static boolean isIgnored(java.lang.reflect.Method method) -
shouldSkipNested
public static boolean shouldSkipNested(java.lang.reflect.Method method) -
isAnExampleStep
public static boolean isAnExampleStep(java.lang.reflect.Method method) -
isIgnored
public boolean isIgnored(java.lang.String methodName) -
getAnnotatedIssueForMethod
public java.util.Optional<java.lang.String> getAnnotatedIssueForMethod(java.lang.String methodName)Return a list of the issues mentioned in the Issue annotation of this method.- Parameters:
methodName
- the name of the test method in the Java test class, if applicable. returns
-
getAnnotatedVersionForMethod
public java.util.Optional<java.lang.String> getAnnotatedVersionForMethod(java.lang.String methodName) -
getAnnotatedIssuesForMethod
public java.lang.String[] getAnnotatedIssuesForMethod(java.lang.String methodName) -
getAnnotatedIssueForTestCase
public java.lang.String getAnnotatedIssueForTestCase(java.lang.Class<?> testCase) -
getAnnotatedVersionForTestCase
public java.lang.String getAnnotatedVersionForTestCase(java.lang.Class<?> testCase) -
getAnnotatedIssuesForTestCase
public java.lang.String[] getAnnotatedIssuesForTestCase(java.lang.Class<?> testCase) -
getTagsForMethod
-
getClassTags
-
getAllTags
-
getTestMethodNames
public java.util.List<java.lang.String> getTestMethodNames()
-