Search in sources :

Example 11 with WebArchive

use of org.jboss.shrinkwrap.api.spec.WebArchive in project javaee7-samples by javaee-samples.

the class MyResourceTest method createDeployment.

/**
     * Arquillian specific method for creating a file which can be deployed
     * while executing the test.
     *
     * @return a war file
     */
@Deployment(testable = false)
public static WebArchive createDeployment() {
    WebArchive war = ShrinkWrap.create(WebArchive.class).addClass(MyApplication.class).addClass(Database.class).addClass(MyResource.class);
    System.out.println(war.toString(true));
    return war;
}
Also used : WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 12 with WebArchive

use of org.jboss.shrinkwrap.api.spec.WebArchive in project javaee7-samples by javaee-samples.

the class MyResourceTest method createDeployment.

@Deployment(testable = false)
public static WebArchive createDeployment() {
    WebArchive war = ShrinkWrap.create(WebArchive.class).addClasses(MyApplication.class, MyResource.class, MyObject.class, MyReader.class, MyWriter.class, AnotherObject.class);
    System.out.println(war.toString(true));
    return war;
}
Also used : WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 13 with WebArchive

use of org.jboss.shrinkwrap.api.spec.WebArchive in project javaee7-samples by javaee-samples.

the class CustomConstraintTest method deployment.

@Deployment
public static Archive<?> deployment() {
    WebArchive war = ShrinkWrap.create(WebArchive.class).addClasses(MyBean.class, ZipCode.class, ZipCodeValidator.class).addAsResource("ValidationMessages.properties");
    System.out.println(war.toString(true));
    return war;
}
Also used : WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 14 with WebArchive

use of org.jboss.shrinkwrap.api.spec.WebArchive in project javaee7-samples by javaee-samples.

the class SecureServletTest method createDeployment.

@Deployment(testable = false)
public static WebArchive createDeployment() {
    WebArchive war = ShrinkWrap.create(WebArchive.class).addClass(SecureServlet.class).addAsResource(new File("src/main/resources/log4j.properties")).addAsWebInfResource((new File("src/main/webapp/WEB-INF/web.xml")));
    System.out.println(war.toString(true));
    return war;
}
Also used : WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) File(java.io.File) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 15 with WebArchive

use of org.jboss.shrinkwrap.api.spec.WebArchive in project javaee7-samples by javaee-samples.

the class MultiplePuTest method createDeployment.

@Deployment
public static WebArchive createDeployment() {
    WebArchive war = ShrinkWrap.create(WebArchive.class).addPackage("org.javaee7.jpa.multiple.pu").addAsResource("META-INF/persistence.xml").addAsResource("META-INF/create.sql").addAsResource("META-INF/drop.sql").addAsResource("META-INF/load.sql");
    System.out.println(war.toString(true));
    return war;
}
Also used : WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Aggregations

WebArchive (org.jboss.shrinkwrap.api.spec.WebArchive)505 Deployment (org.jboss.arquillian.container.test.api.Deployment)409 StringAsset (org.jboss.shrinkwrap.api.asset.StringAsset)159 JavaArchive (org.jboss.shrinkwrap.api.spec.JavaArchive)104 EnterpriseArchive (org.jboss.shrinkwrap.api.spec.EnterpriseArchive)83 OperateOnDeployment (org.jboss.arquillian.container.test.api.OperateOnDeployment)80 HttpRequest (org.jboss.as.test.integration.common.HttpRequest)28 File (java.io.File)22 WebAppDescriptor (org.jboss.shrinkwrap.descriptor.api.webapp30.WebAppDescriptor)14 BatchTestHelper (org.javaee7.util.BatchTestHelper)13 PropertyPermission (java.util.PropertyPermission)11 ZipExporter (org.jboss.shrinkwrap.api.exporter.ZipExporter)11 SocketPermission (java.net.SocketPermission)10 ZipExporterImpl (org.jboss.shrinkwrap.impl.base.exporter.zip.ZipExporterImpl)10 CommonCriteria (org.jboss.as.test.categories.CommonCriteria)9 BeforeClass (org.junit.BeforeClass)9 Util (org.jboss.as.test.shared.integration.ejb.security.Util)7 URL (java.net.URL)6 FilePermission (java.io.FilePermission)5 BeansDescriptor (org.jboss.shrinkwrap.descriptor.api.beans10.BeansDescriptor)5