Package org.jboss.shrinkwrap.api.asset

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


public class TomEEContainerTest {

    @Deployment
    public static WebArchive createDeployment() {
        return ShrinkWrap.create(WebArchive.class, "test.war").addClass(TestServlet.class).addClass(TestEjb.class).addClass(TomEEContainerTest.class)
                .setWebXML(new StringAsset(Descriptors.create(WebAppDescriptor.class).version("3.0").servlet(TestServlet.class, "/ejb").exportAsString()));
    }
View Full Code Here


    public static WebArchive createDeployment() {
        return ShrinkWrap.create(WebArchive.class, "SessionScopeTest.war")
            .addClass(PojoSessionScoped.class).addClass(PojoSessionScopedServletWrapper.class)
            .addAsLibraries(new File("target/test-libs/commons-httpclient.jar"))
            .addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"))
            .setWebXML(new StringAsset(Descriptors.create(WebAppDescriptor.class)
                .version("3.0")
                .servlet(PojoSessionScopedServletWrapper.class, "/session")
                .exportAsString()));
    }
View Full Code Here

public class SessionScopeTest {
    public static final String TEST_SESSION_URL = "http://127.0.0.1:" + System.getProperty("tomee.httpPort", "10080") + "/test/session";

    @Deployment
    public static WebArchive createDeployment() {
        return ShrinkWrap.create(WebArchive.class, "test.war").addClass(PojoSessionScoped.class).addClass(PojoSessionScopedServletWrapper.class).addAsLibraries(new File("target/test-libs/commons-httpclient.jar")).addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml")).setWebXML(new StringAsset(Descriptors.create(WebAppDescriptor.class).version("3.0").servlet(PojoSessionScopedServletWrapper.class, "/session").exportAsString()));
    }
View Full Code Here

    @Deployment
    public static WebArchive createDeployment() {
        return ShrinkWrap.create(WebArchive.class, "test.war")
            .addClass(TestServlet.class).addClass(TestEjb.class).addClass(TomEEContainerTest.class)
                .setWebXML(new StringAsset(
                    Descriptors.create(WebAppDescriptor.class)
                      .version("3.0").servlet(TestServlet.class, "/ejb").exportAsString()));
    }
View Full Code Here

                .addClass(Stratocaster.class)
                .addClass(Pickup.class)
                .addClass(PickupEditor.class)
                .addClass(Style.class)
                .addAsLibraries(JarLocation.jarLocation(Test.class))
                .setWebXML(new StringAsset(descriptor.exportAsString()));



        return archive;
    }
View Full Code Here

        WebArchive archive = ShrinkWrap.create(WebArchive.class, TEST_NAME + ".war")
                .addClass(TestRun.class)
                .addClass(SimpleServlet.class)
                .addClass(Car.class)
                .setWebXML(new StringAsset(descriptor.exportAsString()))
                .addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"));



        return archive;
View Full Code Here

                .addClass(GetResourcesListener.class)
                .addClass(GetResourcesHolder.class)
                .addAsWebResource(Thread.currentThread().getContextClassLoader().getResource("test.getresources"), "/config/test.getresources")
                .addAsWebResource(Thread.currentThread().getContextClassLoader().getResource("test.getresources"), "/config/test.getresources2")
                .addAsLibraries(JarLocation.jarLocation(Test.class))
                .setWebXML(new StringAsset(
                      Descriptors.create(WebAppDescriptor.class)
                        .version("3.0").exportAsString()));
    }
View Full Code Here

        // descriptor.contextParam(ProjectStage.PROJECT_STAGE_PARAM_NAME, ProjectStage.SystemTest.name());

        return ShrinkWrap.create(WebArchive.class, "MyFacesExtCdiDeploymentTest.war")
                .addAsLibraries(JarLocation.jarLocation(Test.class)) // junit
                .addAsLibraries(JarLocation.jarLocation(JsfProjectStageProducer.class)) // codi
                .setWebXML(new StringAsset(descriptor.exportAsString()))
                .addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"));
    }
View Full Code Here

    public static WebArchive createDeployment() {
        final WebAppDescriptor descriptor = Descriptors.create(WebAppDescriptor.class)
                .version("3.0");

        final WebArchive archive = ShrinkWrap.create(WebArchive.class, JAXWSDDTest.class.getSimpleName() + ".war")
                .setWebXML(new StringAsset(descriptor.exportAsString()))
                .addAsLibraries(JarLocation.jarLocation(Test.class))
                .addClass(Hello.class).addClass(HelloWS.class)
                .addAsWebInfResource(new ClassLoaderAsset("org/apache/openejb/arquillian/tests/jaxws/dd/ejb-jar.xml"), "ejb-jar.xml");

        return archive;
View Full Code Here

                .addClass(Car.class)
                .addClass(CompanyLocal.class)
                .addClass(Company.class)
                .addClass(DefaultCompany.class)
                .addClass(SuperMarket.class)
                .setWebXML(new StringAsset(descriptor.exportAsString()))
                .addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"));



        return archive;
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.