Examples of iWantTo()


Examples of org.jbehave.core.configuration.Keywords.iWantTo()

        ensureKeywordIs(properties, META, keywords.meta());
        ensureKeywordIs(properties, META_PROPERTY, keywords.metaProperty());
        ensureKeywordIs(properties, NARRATIVE, keywords.narrative());
        ensureKeywordIs(properties, IN_ORDER_TO, keywords.inOrderTo());
        ensureKeywordIs(properties, AS_A, keywords.asA());
        ensureKeywordIs(properties, I_WANT_TO, keywords.iWantTo());
        ensureKeywordIs(properties, SCENARIO, keywords.scenario());
        ensureKeywordIs(properties, GIVEN_STORIES, keywords.givenStories());
        ensureKeywordIs(properties, EXAMPLES_TABLE, keywords.examplesTable());
        ensureKeywordIs(properties, EXAMPLES_TABLE_ROW, keywords.examplesTableRow());
        ensureKeywordIs(properties, EXAMPLES_TABLE_HEADER_SEPARATOR, keywords.examplesTableHeaderSeparator());
View Full Code Here

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

    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
  public void shouldParseStoryWithAlternativeNarrative() throws IOException{
    String storyAsText = "Feature: Hello Car\n"
View Full Code Here

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

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

    @Test
    public void shouldParseStoryWithBackground() throws IOException{
View Full Code Here

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

        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
    public void shouldParseStoryWithAlternativeNarrative() {
        String wholeStory = "Story: This is free-text description"+ NL +
View Full Code Here

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

        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.asA().toString(), equalTo("customer"));
        assertThat(narrative.iWantTo().toString(), equalTo("get a loan"));
        assertThat(narrative.soThat().toString(), equalTo("I can renovate my house"));
    }

    @Test
    public void shouldParseStoryWithIncompleteNarrative() {
View Full Code Here

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

        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();
            this.passed = passed;
View Full Code Here

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

    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.