Examples of EmbedderClassLoader


Examples of org.jbehave.core.embedder.EmbedderClassLoader

     *
     * @return A EmbedderClassLoader
     */
    protected EmbedderClassLoader classLoader() {
        if (classLoader == null) {
            classLoader = new EmbedderClassLoader(this.getClass().getClassLoader());
        }
        return classLoader;
    }
View Full Code Here

Examples of org.jbehave.core.embedder.EmbedderClassLoader

     *
     * @return An Embedder
     */
    protected Embedder newEmbedder() {
        Embedder embedder = null;
        EmbedderClassLoader classLoader = classLoader();
        if (injectableEmbedderClass != null) {
            embedder = classLoader.newInstance(InjectableEmbedder.class, injectableEmbedderClass).injectedEmbedder();
        } else {
            embedder = classLoader.newInstance(Embedder.class, embedderClass);
        }

        URL codeLocation = codeLocation();
        if (codeLocation != null) {
            embedder.configuration().storyReporterBuilder().withCodeLocation(codeLocation);
        }

        embedder.useClassLoader(classLoader);
        embedder.useEmbedderControls(embedderControls());
        if (executorsClass != null) {
            ExecutorServiceFactory executorServiceFactory = classLoader.newInstance(ExecutorServiceFactory.class,
                    executorsClass);
            embedder.useExecutorService(executorServiceFactory.create(embedder.embedderControls()));
        }
        embedder.useEmbedderMonitor(embedderMonitor());
        if (!metaFilters.isEmpty()) {
View Full Code Here

Examples of org.jbehave.core.embedder.EmbedderClassLoader

    }

    @Test
    public void shouldMapStoriesAsEmbeddables() throws MojoExecutionException, MojoFailureException {
        // Given
        final EmbedderClassLoader classLoader = new EmbedderClassLoader(this.getClass().getClassLoader());
        MapStoriesAsEmbeddables mojo = new MapStoriesAsEmbeddables() {
            @Override
            protected Embedder newEmbedder() {
                return embedder;
            }
View Full Code Here

Examples of org.jbehave.core.embedder.EmbedderClassLoader

    }

    @Test(expected = MojoFailureException.class)
    public void shouldReportFailuresInMappingStoriesAsEmbeddables() throws MojoExecutionException, MojoFailureException {
        // Given
        final EmbedderClassLoader classLoader = new EmbedderClassLoader(this.getClass().getClassLoader());
        MapStoriesAsEmbeddables mojo = new MapStoriesAsEmbeddables() {
            @Override
            protected Embedder newEmbedder() {
                return embedder;
            }
View Full Code Here

Examples of org.jbehave.core.embedder.EmbedderClassLoader

    }

    @Test
    public void shouldMapStoriesAsPaths() throws MojoExecutionException, MojoFailureException {
        // Given
        final EmbedderClassLoader classLoader = new EmbedderClassLoader(this.getClass().getClassLoader());
        MapStoriesAsPaths mojo = new MapStoriesAsPaths() {
            @Override
            protected Embedder newEmbedder() {
                return embedder;
            }
View Full Code Here

Examples of org.jbehave.core.embedder.EmbedderClassLoader

    }

    @Test(expected = MojoFailureException.class)
    public void shouldReportFailuresInMappingStoriesAsPaths() throws MojoExecutionException, MojoFailureException {
        // Given
        final EmbedderClassLoader classLoader = new EmbedderClassLoader(this.getClass().getClassLoader());
        MapStoriesAsPaths mojo = new MapStoriesAsPaths() {
            @Override
            protected Embedder newEmbedder() {
                return embedder;
            }
View Full Code Here

Examples of org.jbehave.core.embedder.EmbedderClassLoader

    }

    @Test
    public void shouldRunStoriesAsEmbeddables() throws MojoExecutionException, MojoFailureException {
        // Given
        final EmbedderClassLoader classLoader = new EmbedderClassLoader(this.getClass().getClassLoader());
        RunStoriesAsEmbeddables mojo = new RunStoriesAsEmbeddables() {
            @Override
            protected Embedder newEmbedder() {
                return embedder;
            }
View Full Code Here

Examples of org.jbehave.core.embedder.EmbedderClassLoader

    }

    @Test(expected = MojoFailureException.class)
    public void shouldReportFailuresInRunningStoriesAsEmbeddables() throws MojoExecutionException, MojoFailureException {
        // Given
        final EmbedderClassLoader classLoader = new EmbedderClassLoader(this.getClass().getClassLoader());
        RunStoriesAsEmbeddables mojo = new RunStoriesAsEmbeddables() {
            @Override
            protected Embedder newEmbedder() {
                return embedder;
            }
View Full Code Here

Examples of org.jbehave.core.embedder.EmbedderClassLoader

    }

    @Test
    public void shouldRunStoriesAsPaths() throws MojoExecutionException, MojoFailureException {
        // Given
        final EmbedderClassLoader classLoader = new EmbedderClassLoader(this.getClass().getClassLoader());
        RunStoriesAsPaths mojo = new RunStoriesAsPaths() {
            @Override
            protected Embedder newEmbedder() {
                return embedder;
            }
View Full Code Here

Examples of org.jbehave.core.embedder.EmbedderClassLoader

    }

    @Test(expected = MojoFailureException.class)
    public void shouldReportFailuresInRunningStoriesAsPaths() throws MojoExecutionException, MojoFailureException {
        // Given
        final EmbedderClassLoader classLoader = new EmbedderClassLoader(this.getClass().getClassLoader());
        RunStoriesAsPaths mojo = new RunStoriesAsPaths() {
            @Override
            protected Embedder newEmbedder() {
                return embedder;
            }
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.