Search in sources :

Example 1 with Deployment

use of org.jboss.arquillian.container.test.api.Deployment in project javaee7-samples by javaee-samples.

the class NoteResourceImplTest method createDeployment.

@Deployment
public static Archive createDeployment() {
    final GenericArchive webResources = ShrinkWrap.create(GenericArchive.class).as(ExplodedImporter.class).importDirectory("src/main/webapp").as(GenericArchive.class);
    final File[] seleniumApi = Maven.resolver().loadPomFromFile("pom.xml").resolve("org.seleniumhq.selenium:selenium-api:2.35.0").withTransitivity().asFile();
    return ShrinkWrap.create(WebArchive.class, NoteResourceImplTest.class.getSimpleName() + ".war").addClasses(Note.class, NoteApp.class, NoteResource.class, NoteResourceImpl.class).addAsResource("META-INF/persistence.xml").addAsWebInfResource("enforce-beans.xml", "jboss-all.xml").addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml").addAsLibraries(seleniumApi).merge(webResources);
}
Also used : NoteResourceImpl(com.example.rest.NoteResourceImpl) GenericArchive(org.jboss.shrinkwrap.api.GenericArchive) Note(com.example.domain.Note) NoteResource(com.example.rest.NoteResource) File(java.io.File) NoteApp(com.example.rest.NoteApp) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 2 with Deployment

use of org.jboss.arquillian.container.test.api.Deployment in project javaee7-samples by javaee-samples.

the class BatchChunkExceptionTest method createDeployment.

/**
     * We're just going to deploy the application as a +web archive+. Note the inclusion of the following files:
     *
     * [source,file]
     * ----
     * /META-INF/batch-jobs/myJob.xml
     * ----
     *
     * The +myJob.xml+ file is needed for running the batch definition.
     */
@Deployment
public static WebArchive createDeployment() {
    WebArchive war = ShrinkWrap.create(WebArchive.class).addClass(BatchTestHelper.class).addPackage("org.javaee7.batch.chunk.exception").addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml")).addAsResource("META-INF/batch-jobs/myJob.xml");
    System.out.println(war.toString(true));
    return war;
}
Also used : WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) BatchTestHelper(org.javaee7.util.BatchTestHelper) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 3 with Deployment

use of org.jboss.arquillian.container.test.api.Deployment in project javaee7-samples by javaee-samples.

the class BatchChunkMapperTest method createDeployment.

/**
     * We're just going to deploy the application as a +web archive+. Note the inclusion of the following files:
     *
     * [source,file]
     * ----
     * /META-INF/batch-jobs/myJob.xml
     * ----
     *
     * The +myJob.xml+ file is needed for running the batch definition.
     */
@Deployment
public static WebArchive createDeployment() {
    WebArchive war = ShrinkWrap.create(WebArchive.class).addClass(BatchTestHelper.class).addPackage("org.javaee7.batch.sample.chunk.mapper").addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml")).addAsResource("META-INF/batch-jobs/myJob.xml");
    System.out.println(war.toString(true));
    return war;
}
Also used : WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) BatchTestHelper(org.javaee7.util.BatchTestHelper) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 4 with Deployment

use of org.jboss.arquillian.container.test.api.Deployment in project javaee7-samples by javaee-samples.

the class BatchChunkOptionalProcessorTest method createDeployment.

/**
     * We're just going to deploy the application as a +web archive+. Note the inclusion of the following files:
     *
     * [source,file]
     * ----
     * /META-INF/batch-jobs/myJob.xml
     * ----
     *
     * The +myJob.xml+ file is needed for running the batch definition.
     */
@Deployment
public static WebArchive createDeployment() {
    WebArchive war = ShrinkWrap.create(WebArchive.class).addClass(BatchTestHelper.class).addPackage("org.javaee7.batch.chunk.optional.processor").addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml")).addAsResource("META-INF/batch-jobs/myJob.xml");
    System.out.println(war.toString(true));
    return war;
}
Also used : WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) BatchTestHelper(org.javaee7.util.BatchTestHelper) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 5 with Deployment

use of org.jboss.arquillian.container.test.api.Deployment in project javaee7-samples by javaee-samples.

the class BatchChunkPartitionTest method createDeployment.

/**
     * We're just going to deploy the application as a +web archive+. Note the inclusion of the following files:
     *
     * [source,file]
     * ----
     * /META-INF/batch-jobs/myJob.xml
     * ----
     *
     * The +myJob.xml+ file is needed for running the batch definition.
     */
@Deployment
public static WebArchive createDeployment() {
    WebArchive war = ShrinkWrap.create(WebArchive.class).addClass(BatchTestHelper.class).addPackage("org.javaee7.batch.sample.chunk.partition").addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml")).addAsResource("META-INF/batch-jobs/myJob.xml");
    System.out.println(war.toString(true));
    return war;
}
Also used : WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) BatchTestHelper(org.javaee7.util.BatchTestHelper) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Aggregations

Deployment (org.jboss.arquillian.container.test.api.Deployment)853 JavaArchive (org.jboss.shrinkwrap.api.spec.JavaArchive)523 WebArchive (org.jboss.shrinkwrap.api.spec.WebArchive)410 StringAsset (org.jboss.shrinkwrap.api.asset.StringAsset)288 OperateOnDeployment (org.jboss.arquillian.container.test.api.OperateOnDeployment)139 EnterpriseArchive (org.jboss.shrinkwrap.api.spec.EnterpriseArchive)139 Asset (org.jboss.shrinkwrap.api.asset.Asset)45 ResourceAdapterArchive (org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive)45 HttpRequest (org.jboss.as.test.integration.common.HttpRequest)28 TargetsContainer (org.jboss.arquillian.container.test.api.TargetsContainer)27 PropertyPermission (java.util.PropertyPermission)26 CommonCriteria (org.jboss.as.test.categories.CommonCriteria)23 AbstractMgmtTestBase (org.jboss.as.test.integration.management.base.AbstractMgmtTestBase)23 JMSOperations (org.jboss.as.test.integration.common.jms.JMSOperations)16 File (java.io.File)15 SocketPermission (java.net.SocketPermission)13 BatchTestHelper (org.javaee7.util.BatchTestHelper)13 WebAppDescriptor (org.jboss.shrinkwrap.descriptor.api.webapp30.WebAppDescriptor)13 Util (org.jboss.as.test.shared.integration.ejb.security.Util)11 Properties (java.util.Properties)10