net.thucydides.core.requirements
Class AnnotationBasedTagProvider
java.lang.Object
net.thucydides.core.requirements.AbstractRequirementsTagProvider
net.thucydides.core.requirements.AnnotationBasedTagProvider
- All Implemented Interfaces:
- RequirementsTagProvider, TagProvider
public class AnnotationBasedTagProvider
- extends AbstractRequirementsTagProvider
- implements RequirementsTagProvider
A requirements Provider that read requirement from class or package annotation.
A class or package needs to be annotated with Narrative
to be a requirement. All package above the class or package will also be considered requirement.
The default root package is "stories", but can be change using ThucydidesSystemProperty.ANNOTATED_REQUIREMENTS_DIRECTORY
It is recommanded to change the root package if the FileSystemRequirementsTagProvider is used.
- See Also:
Narrative,
ThucydidesSystemProperty.ANNOTATED_REQUIREMENTS_DIRECTORY
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AnnotationBasedTagProvider
public AnnotationBasedTagProvider()
AnnotationBasedTagProvider
public AnnotationBasedTagProvider(EnvironmentVariables vars)
getRequirements
public List<Requirement> getRequirements()
- Specified by:
getRequirements in interface RequirementsTagProvider
getParentRequirementOf
public com.google.common.base.Optional<Requirement> getParentRequirementOf(TestOutcome testOutcome)
- Specified by:
getParentRequirementOf in interface RequirementsTagProvider
getRequirementFor
public com.google.common.base.Optional<Requirement> getRequirementFor(TestTag testTag)
- Specified by:
getRequirementFor in interface RequirementsTagProvider
getTagsFor
public Set<TestTag> getTagsFor(TestOutcome testOutcome)
- Description copied from interface:
TagProvider
- Returns the tags associated with a given test outcome.
- Specified by:
getTagsFor in interface TagProvider
Copyright © 2011-2013 Wakaleo Consulting. All Rights Reserved.