Package org.jbehave.core.model

Examples of org.jbehave.core.model.Story.asMeta()


    private Story mockStory(Meta meta) {
        Story story = mock(Story.class);
        when(story.getPath()).thenReturn("/a/path");
        when(story.getMeta()).thenReturn(meta);
        when(story.asMeta(Mockito.anyString())).thenReturn(meta);
        return story;
    }

    private class MyEmbeddable implements Embeddable {
View Full Code Here


        assertThat(story.getLifecycle().getBeforeSteps().size(), equalTo(1));
        assertThat(story.getLifecycle().getBeforeSteps(), hasItem("Given a setup step"));
        assertThat(story.getLifecycle().getAfterSteps().size(), equalTo(1));
        assertThat(story.getLifecycle().getAfterSteps(), hasItem("Then a teardown step"));

        Meta storyAsMeta = story.asMeta("story_");
        assertThat(storyAsMeta.getProperty("story_path"), equalTo(story.getPath()));
        assertThat(storyAsMeta.getProperty("story_description"), equalTo(story.getDescription().asString()));
        assertThat(storyAsMeta.getProperty("story_narrative"), equalTo(story.getNarrative().toString()));
       
        assertThat(story.toString(), containsString("A pending scenario"));
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.