Package org.jboss.shrinkwrap.descriptor.api.spec.servlet.web

Examples of org.jboss.shrinkwrap.descriptor.api.spec.servlet.web.WebAppDescriptor


        validateTest("[passed]");
    }

    @Deployment(testable = false)
    public static WebArchive createDeployment() {
        WebAppDescriptor descriptor = Descriptors.create(WebAppDescriptor.class)
                .version("3.0")
                .servlet(Stratocaster.class, "/" + TEST_NAME);

        addEnvEntry(descriptor, "guitarStringGuages", "java.lang.String", "E1=0.052\nA=0.042\nD=0.030\nG=0.017\nB=0.013\nE=0.010");
        addEnvEntry(descriptor, "certificateOfAuthenticity", "java.lang.String", "/tmp/strat-certificate.txt");
        addEnvEntry(descriptor, "dateCreated", "java.lang.String", "1962-03-01");
        addEnvEntry(descriptor, "pickups", "java.lang.String", "S,S,S");
        addEnvEntry(descriptor, "style", "java.lang.String", "VINTAGE");

        WebArchive archive = ShrinkWrap.create(WebArchive.class, TEST_NAME + ".war")
                .addClass(PojoServlet.class)
                .addClass(Code.class)
                .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


    }

    @Deployment(testable = false)
    public static WebArchive createDeployment() {

        WebAppDescriptor descriptor = Descriptors.create(WebAppDescriptor.class)
                .version("3.0")
                .servlet(SimpleServlet.class, "/" + TEST_NAME);

        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

    @Inject
    private ProjectStage projectStage;

    @Deployment(testable = true)
    public static WebArchive getArchive() {
        final WebAppDescriptor descriptor = Descriptors.create(WebAppDescriptor.class)
                .version("3.0");
        // web.xml params is not supported by default
        // 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

@RunWith(Arquillian.class)
public class JAXWSDDTest {
    @Deployment(testable = false)
    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

        validateTest(expectedOutput);
    }

    @Deployment(testable = false)
    public static WebArchive createDeployment() {
        WebAppDescriptor descriptor = Descriptors.create(WebAppDescriptor.class)
                .version("3.0")
                .filter(PojoServletFilter.class, "/" + TEST_NAME);

        addEnvEntry(descriptor, "returnEmail", "java.lang.String", "tomee@apache.org");
        addEnvEntry(descriptor, "connectionPool", "java.lang.Integer", "20");
        addEnvEntry(descriptor, "startCount", "java.lang.Long", "200000");
        addEnvEntry(descriptor, "initSize", "java.lang.Short", "5");
        addEnvEntry(descriptor, "enableEmail", "java.lang.Boolean", "true");
        addEnvEntry(descriptor, "totalQuantity", "java.lang.Byte", "5");
        addEnvEntry(descriptor, "optionDefault", "java.lang.Character", "X");
        addEnvEntry(descriptor, "auditWriter", "java.lang.Class", "java.lang.String");
//        addEnvEntry(descriptor, "defaultCode", "java.lang.Enum", "Code.OK");

        WebArchive archive = ShrinkWrap.create(WebArchive.class, TEST_NAME + ".war")
            .addClass(Code.class)
            .addClass(PojoServletFilter.class)
                .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

    }

    @Deployment(testable = false)
    public static WebArchive createDeployment() {

        WebAppDescriptor descriptor = Descriptors.create(WebAppDescriptor.class)
                .version("3.0")
                .servlet(SimpleServlet.class, "/" + TEST_NAME);

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



        return archive;
View Full Code Here

    }

    @Deployment(testable = false)
    public static WebArchive createDeployment() {

        WebAppDescriptor descriptor = Descriptors.create(WebAppDescriptor.class)
                .version("3.0")
                .servlet(SimpleServlet.class, "/" + TEST_NAME);

        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

import static junit.framework.Assert.assertTrue;

public abstract class TestSetup {

    public WebArchive createDeployment(Class...archiveClasses) {
        WebAppDescriptor descriptor = Descriptors.create(WebAppDescriptor.class)
                .version("3.0");
        decorateDescriptor(descriptor);

        WebArchive archive = ShrinkWrap.create(WebArchive.class, getTestContextName() + ".war")
                .setWebXML(new StringAsset(descriptor.exportAsString()))
                .addAsLibraries(JarLocation.jarLocation(Test.class))
                .addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"));
       
        if (archiveClasses != null) {
            for (Class c: archiveClasses) {
View Full Code Here

        validateTest(expectedOutput);
    }

    @Deployment(testable = false)
    public static WebArchive createDeployment() {
        WebAppDescriptor descriptor = Descriptors.create(WebAppDescriptor.class)
                .version("3.0")
                .listener(RemoteServletContextListener.class)
                .listener(RemoteServletSessionListener.class)
                .servlet(ServletToCheckListener.class, "/" + TEST_NAME);

        WebArchive archive = ShrinkWrap.create(WebArchive.class, TEST_NAME + ".war")
                .addClass(RemoteServletContextListener.class)
                .addClass(RemoteServletSessionListener.class)
                .addClass(ServletToCheckListener.class)
                .addClass(CompanyRemote.class)
                .addClass(DefaultCompany.class)
                .addClass(ContextAttributeName.class)
                .setWebXML(new StringAsset(descriptor.exportAsString()))
                .addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"));



        return archive;
View Full Code Here

        validateTest(expectedOutput);
    }

    @Deployment(testable = false)
    public static WebArchive createDeployment() {
        WebAppDescriptor descriptor = Descriptors.create(WebAppDescriptor.class)
                .version("3.0")
                .servlet(RemoteServlet.class, "/" + TEST_NAME);

        WebArchive archive = ShrinkWrap.create(WebArchive.class, TEST_NAME + ".war")
                .addClass(RemoteServlet.class)
                .addClass(CompanyRemote.class)
                .addClass(DefaultCompany.class)
                .setWebXML(new StringAsset(descriptor.exportAsString()));



        return archive;
    }
View Full Code Here

TOP

Related Classes of org.jboss.shrinkwrap.descriptor.api.spec.servlet.web.WebAppDescriptor

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.