public class SimpleStory extends groovy.lang.GroovyObjectSupport implements Story
http://dannorth.net/whats-in-a-story/ Title (one line describing the story) Narrative: In Order to [ ] As a [role] I want [feature] So that [benefit] Acceptance Criteria: (presented as Scenarios) Scenario 1: Title Given [context] And [some more context]... When [event] Then [outcome] And [another outcome]... Scenario 2: ...
Story: Returns go to stock In order to keep track of stock As a store owner I want to add items back to stock when they're returned Scenario 1: Refunded items should be returned to stock Given a customer previously bought a black sweater from me And I currently have three black sweaters left in stock When he returns the sweater for a refund Then I should have four black sweaters in stock Scenario 2: Replaced items should be returned to stock Given that a customer buys a blue garment And I have two blue garments in stock And three black garments in stock. When he returns the garment for a replacement in black, Then I should have three blue garments in stock And two black garments in stock
| Constructor and Description |
|---|
SimpleStory() |
| Modifier and Type | Method and Description |
|---|---|
List<Scenario> |
getAfterTasks() |
List<Scenario> |
getBeforeTasks() |
String |
getBenefit() |
String |
getFeature() |
String |
getPurpose() |
String |
getRole() |
List<Scenario> |
getScenarios() |
Parameters |
getSharedDataMap()
This map can be changed out side of the story, for example in task which running inside other thread
|
String |
getTitle() |
void |
putSharedData(String key,
Object value) |
void |
setBenefit(String benefit) |
void |
setFeature(String feature) |
void |
setGlobalParameters(Parameters parameters) |
void |
setPurpose(String purpose) |
void |
setRole(String role) |
void |
setTitle(String title) |
String |
toString() |
public void setTitle(String title)
public void setRole(String role)
public String getFeature()
getFeature in interface Storypublic void setFeature(String feature)
public String getBenefit()
getBenefit in interface Storypublic void setBenefit(String benefit)
public List<Scenario> getScenarios()
getScenarios in interface Storypublic String getPurpose()
public void setPurpose(String purpose)
public Parameters getSharedDataMap()
StorygetSharedDataMap in interface Storypublic void putSharedData(String key, Object value)
putSharedData in interface Storypublic void setGlobalParameters(Parameters parameters)
setGlobalParameters in interface StoryCopyright © 2019. All rights reserved.