Examples of Narrative


Examples of org.jbehave.core.model.Narrative

        Matcher findingElements = patternToPullNarrativeElementsIntoGroups().matcher(narrative);
        if (findingElements.matches()) {
            String inOrderTo = findingElements.group(1).trim();
            String asA = findingElements.group(2).trim();
            String iWantTo = findingElements.group(3).trim();
            return new Narrative(inOrderTo, asA, iWantTo);
        }
        Matcher findingAlternativeElements = patternToPullAlternativeNarrativeElementsIntoGroups().matcher(narrative);
        if (findingAlternativeElements.matches()) {           
            String asA = findingAlternativeElements.group(1).trim();
            String iWantTo = findingAlternativeElements.group(2).trim();
            String soThat = findingAlternativeElements.group(3).trim();
            return new Narrative("", asA, iWantTo, soThat);
        }
        return Narrative.EMPTY;
    }
View Full Code Here

Examples of org.jbehave.core.model.Narrative

  }

    public void beforeStory(Story story, boolean givenStory) {
        print(format("beforeStory", "{0}\n({1})\n", story.getDescription().asString(), story.getPath()));
        if (!story.getNarrative().isEmpty()) {
            Narrative narrative = story.getNarrative();
            print(format("narrative", "{0}\n{1} {2}\n{3} {4}\n{5} {6}\n", keywords.narrative(), keywords.inOrderTo(),
                    narrative.inOrderTo(), keywords.asA(), narrative.asA(), keywords.iWantTo(), narrative.iWantTo()));
        }
    }
View Full Code Here

Examples of org.jbehave.core.model.Narrative

        return parseStory(storyAsText, null);
    }

    public Story parseStory(String storyAsText, String storyPath) {
        Description description = parseDescriptionFrom(storyAsText);
        Narrative narrative = parseNarrativeFrom(storyAsText);
        List<Scenario> scenarios = parseScenariosFrom(storyAsText);
        Story story = new Story(storyPath, description, narrative, scenarios);
        if ( storyPath != null ){
            story.namedAs(new File(storyPath).getName());
        }
View Full Code Here

Examples of org.jbehave.core.model.Narrative

        Matcher findingElements = findElements.matcher(narrative);
        if (findingElements.matches()) {
            String inOrderTo = findingElements.group(1).trim();
            String asA = findingElements.group(2).trim();
            String iWantTo = findingElements.group(3).trim();
            return new Narrative(inOrderTo, asA, iWantTo);
        }
        return Narrative.EMPTY;
    }
View Full Code Here

Examples of org.jbehave.core.story.domain.Narrative

* @author <a href="mailto:dan.north@thoughtworks.com">Dan North </a>
*/
public class UserWithdrawsCash extends ScenarioDrivenStory {

    public UserWithdrawsCash() {
        super(new Narrative(
            "Bank card holder",
            "to be able to withdraw cash from an ATM",
            "I don't have to visit the bank"
        ));
    }
View Full Code Here

Examples of org.jbehave.core.story.domain.Narrative


public class ThePlayerInteractsWithTheGlyph extends ScenarioDrivenStory {

    public ThePlayerInteractsWithTheGlyph() {
        super(new Narrative("game player", "to move the shape", "I can make space for the next glyph"));
    }
View Full Code Here

Examples of org.jbehave.core.story.domain.Narrative

import com.sirenian.hellbound.stories.util.HellboundStoryBase;

public class ThePlayerLosesTheGame extends HellboundStoryBase{
   
    public ThePlayerLosesTheGame() {
        super(new Narrative("game player", "to lose the game", "the game is a challenge"));
    }
View Full Code Here

Examples of org.jbehave.core.story.domain.Narrative

import com.sirenian.hellbound.stories.util.HellboundStoryBase;

public class TheGlyphIsConstrainedByThePit extends HellboundStoryBase {

    public TheGlyphIsConstrainedByThePit() {
        super(new Narrative("game player", "the glyph to be constrained by the pit", "the game has boundaries"));
    }
View Full Code Here

Examples of org.jbehave.core.story.domain.Narrative


public class ThePlayerDropsTheGlyph extends ScenarioDrivenStory {

  public ThePlayerDropsTheGlyph() {
    super(new Narrative("game player", "to drop the glyph", " I can save time"));
  }
View Full Code Here

Examples of org.jbehave.core.story.domain.Narrative

public class ThePlayerMakesALine extends HellboundStoryBase {
   
   
    public ThePlayerMakesALine() {
        super(new Narrative("game player", "lines to disappear when I complete them", "I can progress the game"));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.