Package org.jbehave.core.story.domain

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


        expectedScenario2.outcome.outcomes.add("bartender denies Joe");
        expectedScenario2.outcome.outcomes.add("Joe is unhappy");
        storyDetails.addScenario(expectedScenario2);

        // when
        Story story = new StoryBuilder(storyDetails, "jbehave.core.story.stories").story();
       
        // then
        ensureThat(story, isNotNull());
    }
View Full Code Here


        this.directory = directory;
    }


    private void print(String storyClass) throws InstantiationException, IllegalAccessException, ClassNotFoundException, IOException {
        Story story = loader.loadStory(storyClass);
        String[] storyNameParts = story.getClass().getName().split("\\.");
        String simpleStoryName = storyNameParts[storyNameParts.length - 1];
       
        File file = new File(directory, simpleStoryName + ".story");
        if (!file.exists()) {
            file.createNewFile();
View Full Code Here

        this.classLoader = classLoader;
    }

    public void run(String storyClassName, PrintStream printStream)
        throws InstantiationException, IllegalAccessException, ClassNotFoundException {   
        Story story = loadStory(storyClassName, classLoader);
        story.specify();
        run(story, printStream);
    }
View Full Code Here

        this.storyLoader = storyLoader;
        this.renderer = renderer;
    }

    public void print(String storyPath, String storyPackage) throws MalformedURLException {
        Story story = storyLoader.loadStory(storyPath, storyPackage);
        story.narrateTo(renderer);
    }
View Full Code Here

        Story story = storyLoader.loadStory(storyPath, storyPackage);
        story.narrateTo(renderer);
    }

    public void print(String storyClassName) throws InstantiationException, IllegalAccessException, ClassNotFoundException{
        Story story = storyLoader.loadStory(storyClassName);
        story.specify();
        story.narrateTo(renderer);
    }
View Full Code Here

   
    public void execute() throws MojoExecutionException, MojoFailureException {
        try {
            getLog().debug("Running story "+ storyPath);
            StoryLoader loader = new StoryLoader(storyParser, new BehavioursClassLoader(classpathElements));
            Story story = loader.loadStory(storyPath, storyPackage);           
            storyRunner.run(story);
        } catch (Exception e) {
            throw new MojoExecutionException("Failed to run story "+storyPath+" with package "+storyPackage, e);
        }
    }
View Full Code Here

TOP

Related Classes of org.jbehave.core.story.domain.Story

Copyright © 2018 www.massapicom. 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.