Examples of Embedder


Examples of net.nczonline.web.cssembed.Embedder

              final int processorOptions = CSSURLEmbedder.DATAURI_OPTION
                  | CSSURLEmbedder.SKIP_MISSING_OPTION;
              final int maxUriLength = getMaxUriLength(options);
              final int maxImageSize = getMaxImageSize(options);

              new Embedder(resource, new StringReader(resource.getContents()),
                  processorOptions, true, maxUriLength, maxImageSize)
                  .embedImages(writer, root);
            }
          });
    } catch (final UnknownHostException e) {
View Full Code Here

Examples of org.apache.openejb.loader.Embedder

        } catch (IOException e) {
            // ignored
        }

        // set the embedder
        final Embedder embedder = new Embedder("org.apache.tomee.catalina.TomcatLoader");
        SystemInstance.get().setComponent(Embedder.class, embedder);
        try {
            // create the loader

            // This init call affects only this WebappClassloader and is just required
            // for runnig the Embedder.  The SystemInstance will be initialized more permanently
            // in the parent classloader once the required libraries are added.
            SystemInstance.init(properties);

            // This guy does the magic of squishing the openejb libraries into the parent classloader
            // and kicking off the reall integration.
            embedder.init(properties);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
View Full Code Here

Examples of org.apache.tika.embedder.Embedder

     * Tests embedding metadata then reading metadata to verify the results.
     *
     * @param isResultExpectedInOutput whether or not results are expected in command line output
     */
    protected void embedInTempFile(InputStream sourceInputStream, boolean isResultExpectedInOutput) {
        Embedder embedder = getEmbedder();
       
        // TODO Move this check to ExternalEmbedder
        String os = System.getProperty("os.name", "");
        if (os.contains("Windows")) {
            // Skip test on Windows
            return;
        }
       
        Date timestamp = new Date();
        Metadata metadataToEmbed = getMetadataToEmbed(timestamp);

        try {
            File tempOutputFile = tmp.createTemporaryFile();
            FileOutputStream tempFileOutputStream = new FileOutputStream(tempOutputFile);

            // Embed the metadata into a copy of the original output stream
            embedder.embed(metadataToEmbed, sourceInputStream, tempFileOutputStream, null);

            ParseContext context = new ParseContext();
            Parser parser = getParser();
            context.set(Parser.class, parser);

View Full Code Here

Examples of org.codehaus.plexus.embed.Embedder

        // ----------------------------------------------------------------------
        // Now that we have everything that we need we will fire up plexus and
        // bring the maven component to life for use.
        // ----------------------------------------------------------------------

        embedder = new Embedder();

        try
        {
            embedder.start( classWorld );
        }
View Full Code Here

Examples of org.jbehave.core.embedder.Embedder

    @Test
    public void shouldCreateEmbeddableInstanceFromInjectableEmbedder() {
        AnnotationBuilder annotatedInjectable = new AnnotationBuilder(AnnotedInjectable.class);
        Object instance = annotatedInjectable.embeddableInstance();
        assertThat(instance, Matchers.instanceOf(InjectableEmbedder.class));
        Embedder embedder = ((InjectableEmbedder) instance).injectedEmbedder();
        assertThat(embedder.configuration().keywords(), instanceOf(MyKeywords.class));
        assertThat(embedder.metaFilters(), equalTo(asList("+embedder injectable")));
        assertThat(embedder.systemProperties().getProperty("one"), equalTo("One"));
        assertThat(embedder.systemProperties().getProperty("two"), equalTo("Two"));
        assertThatStepsInstancesAre(embedder.stepsFactory().createCandidateSteps(), MySteps.class);
    }
View Full Code Here

Examples of org.jbehave.core.embedder.Embedder

    @Test
    public void shouldCreateEmbeddableInstanceFromInjectableEmbedderWithoutStepsFactory() {
        AnnotationBuilder annotatedInjectable = new AnnotationBuilder(AnnotedInjectableWithoutStepsFactory.class);
        Object instance = annotatedInjectable.embeddableInstance();
        assertThat(instance, Matchers.instanceOf(InjectableEmbedder.class));
        Embedder embedder = ((InjectableEmbedder) instance).injectedEmbedder();
        assertThat(embedder.configuration().keywords(), instanceOf(MyKeywords.class));
        assertThat(embedder.metaFilters(), equalTo(asList("+embedder injectable")));
        assertThatStepsInstancesAre(embedder.candidateSteps(), MySteps.class);
    }
View Full Code Here

Examples of org.jbehave.core.embedder.Embedder

    @Test
    public void shouldCreateEmbeddableInstanceFromConfigurableEmbedder() {
        AnnotationBuilder annotatedConfigurable = new AnnotationBuilder(AnnotedConfigurable.class);
        Object instance = annotatedConfigurable.embeddableInstance();
        assertThat(instance, Matchers.instanceOf(ConfigurableEmbedder.class));
        Embedder embedder = ((ConfigurableEmbedder) instance).configuredEmbedder();
        assertThat(embedder.configuration().keywords(), instanceOf(MyKeywords.class));
        assertThat(embedder.metaFilters(), equalTo(asList("+embedder configurable")));
        assertThatStepsInstancesAre(embedder.stepsFactory().createCandidateSteps(), MySteps.class);
    }
View Full Code Here

Examples of org.jbehave.core.embedder.Embedder

    @Test
    public void shouldCreateEmbeddableInstanceFromConfigurableEmbedderWithoutStepsFactory() {
        AnnotationBuilder annotatedConfigurable = new AnnotationBuilder(AnnotedConfigurableWithoutStepsFactory.class);
        Object instance = annotatedConfigurable.embeddableInstance();
        assertThat(instance, Matchers.instanceOf(ConfigurableEmbedder.class));
        Embedder embedder = ((ConfigurableEmbedder) instance).configuredEmbedder();
        assertThat(embedder.configuration().keywords(), instanceOf(MyKeywords.class));
        assertThat(embedder.metaFilters(), equalTo(asList("+embedder configurable")));
        assertThatStepsInstancesAre(embedder.candidateSteps(), MySteps.class);
    }
View Full Code Here

Examples of org.jbehave.core.embedder.Embedder

*/
public class CoreStoryRunner {

    @Test
    public void mapStories() {
        Embedder embedder = new Embedder();
        embedder.useMetaFilters(asList("+author *", "+theme *", "-skip"));
        List<String> storyPaths = new StoryFinder().findPaths(codeLocationFromClass(this.getClass()), "**/*.story", "");
        embedder.mapStoriesAsPaths(storyPaths);
    }
View Full Code Here

Examples of org.jbehave.core.embedder.Embedder

    }

    @Test
    public void runClasspathLoadedStoriesAsJUnit() {
        // CoreEmbedder defines the configuration and steps factory
        Embedder embedder = new CoreEmbedder();
        embedder.embedderControls().doIgnoreFailureInStories(true);
        List<String> storyPaths = new StoryFinder().findPaths(codeLocationFromClass(this.getClass()), "**/*.story", "");
        embedder.runStoriesAsPaths(storyPaths);
    }
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.