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 voidaddTag(java.util.List<TestTag> tags, WithTag tagAnnotation)static voidaddTags(java.util.List<TestTag> tags, WithTags tagSet)static voidaddTagValues(java.util.List<TestTag> tags, WithTagValuesOf tagSet)static TestTagconvertToTestTag(WithTag withTag)static TestAnnotationsforClass(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.StringgetAnnotatedIssueForTestCase(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.StringgetAnnotatedVersionForTestCase(java.lang.Class<?> testCase)java.util.List<TestTag>getClassTags()static java.util.List<TestTag>getTagsForMethod(java.lang.reflect.Method method)java.util.List<TestTag>getTagsForMethod(java.lang.String methodName)java.util.List<java.lang.String>getTestMethodNames()static booleanisAnExampleStep(java.lang.reflect.Method method)static booleanisIgnored(java.lang.reflect.Method method)booleanisIgnored(java.lang.String methodName)static booleanisPending(java.lang.reflect.Method method)booleanisPending(java.lang.String methodName)static booleanshouldSkipNested(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
-
getTagsForMethod
-
getClassTags
-
getAllTags
-
addTag
-
addTags
-
addTagValues
-
convertToTestTag
-
getTestMethodNames
public java.util.List<java.lang.String> getTestMethodNames()
-