Package org.jboss.shrinkwrap.api.asset

Examples of org.jboss.shrinkwrap.api.asset.StringAsset


   public static WebArchive getDeployment()
   {
      WebArchive deployment = RewriteTest
               .getDeployment("ROOT.war")
               // The TomEE Arquillian adapter doesn't like ROOT.war, so we force the root context path via context.xml
               .addAsManifestResource(new StringAsset("<Context path=\"\"/>"), "context.xml")
               // required for Glassfish to get application to the root context path
               .addAsWebInfResource(new StringAsset("<glassfish-web-app><context-root>/</context-root></glassfish-web-app>"),
                        "glassfish-web.xml")
               .addAsWebResource(new StringAsset(""), "index.html")
               .addAsServiceProvider(ConfigurationProvider.class, HistoryRewriteConfiguration.class);
      return deployment;
   }
View Full Code Here


   @Deployment(testable = false)
   public static WebArchive getDeployment()
   {
      WebArchive deployment = RewriteTest
               .getDeployment()
               .addAsWebResource(new StringAsset(""), "index.html")
               .addAsServiceProvider(ConfigurationProvider.class, HistoryRewriteConfiguration.class);
      return deployment;
   }
View Full Code Here

{
   @Deployment(testable = false)
   public static WebArchive getDeployment()
   {
      return RewriteTest.getDeployment()
               .addAsWebResource(new StringAsset(".class {\n  width : 100px;\n}"), "test.css")
               .addAsLibraries(getTransformArchive())
               .addAsLibraries(resolveDependency("com.yahoo.platform.yui:yuicompressor"))
               .addClasses(CssMinifyTestProvider.class)
               .addAsServiceProvider(ConfigurationProvider.class, CssMinifyTestProvider.class);
   }
View Full Code Here

{
   @Deployment(testable = false)
   public static WebArchive getDeployment()
   {
      return RewriteTest.getDeployment()
               .addAsWebResource(new StringAsset("var text = \"hello\";\n\nalert(text);"), "test.js")
               .addAsLibraries(CssMinifyTest.getTransformArchive())
               .addAsLibraries(resolveDependency("com.yahoo.platform.yui:yuicompressor"))
               .addAsLibraries(resolveDependency("rhino:js"))
               .addClasses(JsMinifyTestProvider.class)
               .addAsServiceProvider(ConfigurationProvider.class, JsMinifyTestProvider.class);
View Full Code Here

   {
      WebArchive deployment = RewriteTest.getDeployment()
               .addAsLibraries(resolveDependencies("org.tuckey:urlrewritefilter:3.1.0"))
               .addAsServiceProvider(ConfigurationProvider.class, TuckeyConfigurationProvider.class)
               .addAsWebInfResource("urlrewrite.xml")
               .addAsWebResource(new StringAsset("exists"), "index.html")
               .addPackages(true, TuckeyRoot.class.getPackage());

      return deployment;
   }
View Full Code Here

   public static WebArchive getDeployment()
   {
      return RewriteTest.getDeployment()
               .addClass(CommittedResponseProvider.class)
               .addAsServiceProvider(ConfigurationProvider.class, CommittedResponseProvider.class)
               .addAsWebResource(new StringAsset("[redirection worked]"), "redirected.txt")
               .addAsWebResource(new StringAsset("[incorrect content]"), "incorrect.txt");
   }
View Full Code Here

        if (CdiContainerUnderTest.is(CONTAINER_WELD_2_0_0))
        {
            return ShrinkWrap.create(WebArchive.class, "empty.war");
        }

        Asset beansXml = new StringAsset(
            "<beans><interceptors><class>" +
                    CustomInterceptorImpl.class.getName() +
            "</class></interceptors></beans>"
        );
View Full Code Here

        String archiveName = simpleName.substring(0, 1).toLowerCase() + simpleName.substring(1);

        JavaArchive testJar = ShrinkWrap.create(JavaArchive.class, "customSchedulerTest.jar")
                .addPackage(CustomSchedulerWarFileTest.class.getPackage().getName())
                .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
                .addAsResource(new StringAsset(MockedScheduler.class.getName()),
                        "META-INF/services/" + Scheduler.class.getName())
                .addAsResource(new StringAsset(CustomConfigSource.class.getName()),
                        "META-INF/services/" + ConfigSource.class.getName());

        return ShrinkWrap.create(WebArchive.class, archiveName + ".war")
                .addAsLibraries(ArchiveUtils.getDeltaSpikeCoreAndSchedulerArchive())
                .addAsLibraries(testJar)
View Full Code Here

        String archiveName = simpleName.substring(0, 1).toLowerCase() + simpleName.substring(1);

        JavaArchive testJar = ShrinkWrap.create(JavaArchive.class, "scopeNotStartedTest.jar")
                .addPackage(CustomSchedulerWarFileTest.class.getPackage().getName())
                .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
                .addAsResource(new StringAsset(MockedScheduler.class.getName()),
                        "META-INF/services/" + Scheduler.class.getName())
                .addAsResource(new StringAsset(CustomDeactivatedConfigSource.class.getName()),
                        "META-INF/services/" + ConfigSource.class.getName());

        return ShrinkWrap.create(WebArchive.class, archiveName + ".war")
                .addAsLibraries(ArchiveUtils.getDeltaSpikeCoreAndSchedulerArchive())
                .addAsLibraries(testJar)
View Full Code Here

                "ds-core_and_security");
    }

    public static Asset getBeansXml()
    {
        Asset beansXml = new StringAsset(
            "<beans>" +
                "<interceptors>" +
                    "<class>org.apache.deltaspike.security.impl.extension.SecurityInterceptor</class>" +
                "</interceptors>" +
            "</beans>"
View Full Code Here

TOP

Related Classes of org.jboss.shrinkwrap.api.asset.StringAsset

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.