use of org.jboss.arquillian.container.test.api.Deployment in project javaee7-samples by javaee-samples.
the class BatchListenersTest 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.batch.listeners").addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml")).addAsResource("META-INF/batch-jobs/myJob.xml");
System.out.println(war.toString(true));
return war;
}
use of org.jboss.arquillian.container.test.api.Deployment 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;
}
use of org.jboss.arquillian.container.test.api.Deployment 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;
}
use of org.jboss.arquillian.container.test.api.Deployment 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;
}
use of org.jboss.arquillian.container.test.api.Deployment 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;
}
Aggregations