public class AnnotationManager extends Object
| Constructor and Description |
|---|
AnnotationManager(Annotation... annotations)
Construct AnnotationManager using given annotations
|
AnnotationManager(Collection<Annotation> annotations)
Construct AnnotationManager using given annotations
|
| Modifier and Type | Method and Description |
|---|---|
<T extends Annotation> |
getAnnotation(Class<T> annotationType)
Find annotation with specified type into
annotations |
ru.yandex.qatools.allure.model.Description |
getDescription()
Find first
Description annotation |
List<ru.yandex.qatools.allure.model.Label> |
getFeatureLabels()
Construct label for all
Features annotations
using AllureModelUtils.createFeatureLabel(String) |
String |
getIssueKey()
Find first
Issue annotation |
String[] |
getIssueKeys()
Find
Issues annotation and return respective key |
ru.yandex.qatools.allure.model.SeverityLevel |
getSeverity()
Find first
Severity annotation |
List<ru.yandex.qatools.allure.model.Label> |
getStoryLabels()
Construct label for all
Stories annotations
using AllureModelUtils.createStoryLabel(String) |
String |
getTitle()
Find first
Title annotation |
<T extends Annotation> |
isAnnotationPresent(Class<T> annotationType)
Returns true if
annotations contains annotation with specified type,
false otherwise |
boolean |
isDescriptionAnnotationPresent() |
boolean |
isFeaturesAnnotationPresent() |
boolean |
isIssueAnnotationPresent() |
boolean |
isIssuesAnnotationPresent() |
boolean |
isSeverityAnnotationPresent() |
boolean |
isStoriesAnnotationPresent() |
boolean |
isTestCaseIdAnnotationPresent() |
boolean |
isTitleAnnotationPresent() |
void |
setDefaults(Annotation[] defaultAnnotations)
Set default values for annotations.
|
void |
update(TestCaseStartedEvent event)
Sets into specified
TestCaseStartedEvent
information from Allure annotations. |
void |
update(TestSuiteStartedEvent event)
Sets into specified
TestSuiteStartedEvent
information from Allure annotations. |
static TestCaseStartedEvent |
withExecutorInfo(TestCaseStartedEvent event)
Add information about host and thread to specified test case started event
|
public AnnotationManager(Collection<Annotation> annotations)
annotations - initial value for annotationspublic AnnotationManager(Annotation... annotations)
annotations - initial value for annotationspublic void setDefaults(Annotation[] defaultAnnotations)
defaultAnnotations - default value for annotationspublic void update(TestSuiteStartedEvent event)
TestSuiteStartedEvent
information from Allure annotations.event - to changepublic void update(TestCaseStartedEvent event)
TestCaseStartedEvent
information from Allure annotations.event - to changepublic static TestCaseStartedEvent withExecutorInfo(TestCaseStartedEvent event)
event - given event to updatepublic boolean isTitleAnnotationPresent()
Title
annotation present in annotations and false otherwisepublic boolean isDescriptionAnnotationPresent()
Description
annotation present in annotations and false otherwisepublic boolean isSeverityAnnotationPresent()
Severity
annotation present in annotations and false otherwisepublic boolean isStoriesAnnotationPresent()
Stories
annotation present in annotations and false otherwisepublic boolean isFeaturesAnnotationPresent()
Features
annotation present in annotations and false otherwisepublic boolean isIssuesAnnotationPresent()
Issues
annotation present in annotations and false otherwisepublic boolean isIssueAnnotationPresent()
Issue
annotation present in annotations and false otherwisepublic boolean isTestCaseIdAnnotationPresent()
public String getTitle()
Title annotationpublic ru.yandex.qatools.allure.model.Description getDescription()
Description annotationDescription or null if
annotation doesn't presentpublic ru.yandex.qatools.allure.model.SeverityLevel getSeverity()
Severity annotationSeverityLevel or null if
annotation doesn't presentpublic String getIssueKey()
Issue annotationpublic List<ru.yandex.qatools.allure.model.Label> getStoryLabels()
Stories annotations
using AllureModelUtils.createStoryLabel(String)List of created labelspublic List<ru.yandex.qatools.allure.model.Label> getFeatureLabels()
Features annotations
using AllureModelUtils.createFeatureLabel(String)List of created labelspublic String[] getIssueKeys()
Issues annotation and return respective keypublic <T extends Annotation> boolean isAnnotationPresent(Class<T> annotationType)
annotations contains annotation with specified type,
false otherwiseannotationType - annotation type to findannotations contains annotation with specified type,
false otherwisepublic <T extends Annotation> T getAnnotation(Class<T> annotationType)
annotationsannotationType - annotation type to findannotations doesn't contains suchCopyright © 2017 Yandex. All rights reserved.