Package org.jbehave.core.model

Examples of org.jbehave.core.model.Narrative.inOrderTo()


          + "Given I have a car with 4 wheels\n"
          + "Then I can drive it.\n";
    Story story = storyParser.parseStory(storyAsText);
    assertThat(story.getDescription().asString(), equalTo("Hello Car"));   
    Narrative narrative = story.getNarrative();
    assertThat(narrative.inOrderTo(), equalTo("feel safer"));
    assertThat(narrative.asA(), equalTo("car driver"));
    assertThat(narrative.iWantTo(), equalTo("drive cars on 4 wheels"));
  }

  @Test
View Full Code Here


                wholeStory, storyPath);
        Description description = story.getDescription();
        assertThat(description.asString(), equalTo("Story: This is free-text description"));
        Narrative narrative = story.getNarrative();
        assertThat(narrative.isEmpty(), not(true));
        assertThat(narrative.inOrderTo().toString(), equalTo("renovate my house"));
        assertThat(narrative.asA().toString(), equalTo("customer"));
        assertThat(narrative.iWantTo().toString(), equalTo("get a loan"));
    }

    @Test
View Full Code Here

        public XRefStory(Story story, StoryReporterBuilder storyReporterBuilder, boolean passed, boolean pending) {
            this.story = story;
            Narrative narrative = story.getNarrative();
            if (!narrative.isEmpty()) {
                this.narrative = "In order to " + narrative.inOrderTo() + "\n" + "As a " + narrative.asA() + "\n"
                        + "I want to " + narrative.iWantTo() + "\n";
            }
            this.description = story.getDescription().asString();
            this.name = story.getName();
            this.path = story.getPath();
View Full Code Here

    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()));
        }
    }

    public void afterStory(boolean givenStory) {
        print(format("afterStory", "\n"));
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.