Package net.thucydides.core.model
Class Story
java.lang.Object
net.thucydides.core.model.Story
Represents a given user story or feature.
Used to record test results and so on.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedStory(String id, String storyName, String storyClassName, String displayName, String path, ApplicationFeature feature) Story(String id, String storyName, String storyClassName, String displayName, String path, ApplicationFeature feature, String narrative) Story(String id, String storyName, String storyClassName, String displayName, String path, ApplicationFeature feature, String narrative, String type) protected -
Method Summary
Modifier and TypeMethodDescriptionasTag()static Storybooleanstatic StoryObtain a story instance from a given story class.static Class<?>getFeatureClass(Class<?> userStoryClass) What feature does this story belong to?getId()getName()Each story has a descriptive name.getPath()getReportName(ReportType type) Find the name of the report for this story for the specified report type (XML, HTML,...).getType()inthashCode()static Class<?>testedInTestCase(Class<?> testClass) Returns the class representing the story that is tested by a given test class This is indicated by the Story annotation.static StoryCreate a story using a full class name as an id.static Storystatic StorywithIdAndPath(String storyId, String storyName, String storyPath) static StorywithIdAndPathAndFeature(String storyId, String storyName, String storyPath, String featureClassName, String featureName) withNarrative(String narrative)
-
Constructor Details
-
Story
-
Story
-
Story
-
Story
-
Story
protected Story(String id, String storyName, String displayName, ApplicationFeature feature, String path)
-
-
Method Details
-
getId
-
from
Obtain a story instance from a given story class. Story instances are used for recording and reporting test results. -
withId
Create a story using a full class name as an id. Note that the class may no longer exist, so the story needs to be able to exist beyond the life of the original story class. This is used to deserialize stories from XML files. -
withNarrative
-
withType
-
withIdAndPath
-
called
-
withId
-
withIdAndPathAndFeature
-
equals
-
hashCode
public int hashCode() -
getFeatureClass
What feature does this story belong to? -
testedInTestCase
Returns the class representing the story that is tested by a given test class This is indicated by the Story annotation. -
getName
Each story has a descriptive name. This name is usually a human-readable version of the class name, or the story name for an easyb story. -
getDisplayName
-
getStoryClassName
-
getReportName
Find the name of the report for this story for the specified report type (XML, HTML,...). -
getReportName
-
getFeature
-
getPath
-
getStoryName
-
getNarrative
-
getNarrativeSummary
-
getType
-
withPath
-
asFeature
-
asTag
-
asQualifiedTag
-