Search in sources :

Example 86 with Deployment

use of org.jboss.arquillian.container.test.api.Deployment in project wildfly by wildfly.

the class JarResourceListingTestCase method deploy.

@Deployment
public static Archive<?> deploy() {
    JavaArchive jar = ShrinkWrap.create(JavaArchive.class);
    jar.addClasses(JarResourceListingTestCase.class, ResourceListingUtils.class);
    jar.add(EmptyAsset.INSTANCE, "META-INF/example.txt");
    jar.add(EmptyAsset.INSTANCE, "META-INF/properties/nested.properties");
    // shrink wrapper creates it in default, this way it is more clear that it's there
    jar.addAsManifestResource(EmptyAsset.INSTANCE, "MANIFEST.MF");
    jar.add(EmptyAsset.INSTANCE, "example2.txt");
    jar.addAsResource(JarResourceListingTestCase.class.getPackage(), "TextFile1.txt", "TextFile1.txt");
    return jar;
}
Also used : JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 87 with Deployment

use of org.jboss.arquillian.container.test.api.Deployment in project wildfly by wildfly.

the class EarJBossDeploymentStructureTestCase method createDeployment.

/**
     * .ear
     * |
     * |--- META-INF
     * |       |
     * |       |--- jboss-deployment-structure.xml
     * |
     * |--- ejb.jar
     * |
     * |--- available.jar
     * |
     * |--- ignored.jar
     *
     * @return
     */
@Deployment
public static Archive<?> createDeployment() {
    final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "deployment-structure.ear");
    ear.addAsManifestResource(EarJBossDeploymentStructureTestCase.class.getPackage(), "jboss-deployment-structure.xml", "jboss-deployment-structure.xml");
    final JavaArchive jarOne = ShrinkWrap.create(JavaArchive.class, "available.jar");
    jarOne.addClass(Available.class);
    jarOne.addAsManifestResource(new StringAsset("test resource"), METAINF_RESOURCE_TXT);
    final JavaArchive ignoredJar = ShrinkWrap.create(JavaArchive.class, "ignored.jar");
    ignoredJar.addClass(ToBeIgnored.class);
    final JavaArchive ejbJar = ShrinkWrap.create(JavaArchive.class, "ejb.jar");
    ejbJar.addClasses(ClassLoadingEJB.class, EarJBossDeploymentStructureTestCase.class);
    // grant necessary permissions
    ejbJar.addAsResource(createPermissionsXmlAsset(new RuntimePermission("getProtectionDomain")), "META-INF/jboss-permissions.xml");
    ear.addAsModule(jarOne);
    ear.addAsModule(ignoredJar);
    ear.addAsModule(ejbJar);
    return ear;
}
Also used : EnterpriseArchive(org.jboss.shrinkwrap.api.spec.EnterpriseArchive) StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 88 with Deployment

use of org.jboss.arquillian.container.test.api.Deployment in project wildfly by wildfly.

the class JarJBossDeploymentStructureTestCase method createDeployment.

@Deployment
public static Archive<?> createDeployment() {
    final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "deployment-structure.jar");
    jar.addAsManifestResource(JarJBossDeploymentStructureTestCase.class.getPackage(), "jboss-deployment-structure.xml", "jboss-deployment-structure.xml");
    final JavaArchive jarOne = ShrinkWrap.create(JavaArchive.class, "available.jar");
    jarOne.addClass(Available.class);
    final JavaArchive ignoredJar = ShrinkWrap.create(JavaArchive.class, "ignored.jar");
    ignoredJar.addClass(ToBeIgnored.class);
    final JavaArchive otherJar = ShrinkWrap.create(JavaArchive.class, "otherJar.jar");
    otherJar.addClass(InSameModule.class);
    jar.addClasses(ClassLoadingEJB.class, JarJBossDeploymentStructureTestCase.class);
    jar.add(jarOne, "a", ZipExporter.class);
    jar.add(ignoredJar, "i", ZipExporter.class);
    jar.add(otherJar, "other", ZipExporter.class);
    jar.addAsManifestResource(createPermissionsXmlAsset(new RuntimePermission("getClassLoader"), new RuntimePermission("getProtectionDomain")), "permissions.xml");
    return jar;
}
Also used : JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 89 with Deployment

use of org.jboss.arquillian.container.test.api.Deployment in project wildfly by wildfly.

the class GlobalModulesTestCase method deploy.

@Deployment
public static Archive<?> deploy() {
    final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "testglobal.jar");
    jar.addClass(GlobalModulesTestCase.class);
    return jar;
}
Also used : JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 90 with Deployment

use of org.jboss.arquillian.container.test.api.Deployment in project wildfly by wildfly.

the class InitializeInOrderTestCase method deployment.

@Deployment
public static Archive<?> deployment() {
    final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "init.ear");
    ear.addAsResource(InitializeInOrderTestCase.class.getPackage(), "application.xml", "application.xml");
    final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "ejb.jar");
    jar.addClasses(MyEjb.class, InitializeInOrderTestCase.class);
    ear.addAsModule(jar);
    final WebArchive war = ShrinkWrap.create(WebArchive.class, "web.war");
    war.addClass(MyServlet.class);
    ear.addAsModule(war);
    return ear;
}
Also used : EnterpriseArchive(org.jboss.shrinkwrap.api.spec.EnterpriseArchive) WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Aggregations

Deployment (org.jboss.arquillian.container.test.api.Deployment)869 JavaArchive (org.jboss.shrinkwrap.api.spec.JavaArchive)530 WebArchive (org.jboss.shrinkwrap.api.spec.WebArchive)423 StringAsset (org.jboss.shrinkwrap.api.asset.StringAsset)299 EnterpriseArchive (org.jboss.shrinkwrap.api.spec.EnterpriseArchive)146 OperateOnDeployment (org.jboss.arquillian.container.test.api.OperateOnDeployment)139 ResourceAdapterArchive (org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive)48 Asset (org.jboss.shrinkwrap.api.asset.Asset)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 WebAppDescriptor (org.jboss.shrinkwrap.descriptor.api.webapp30.WebAppDescriptor)22 File (java.io.File)17 JMSOperations (org.jboss.as.test.integration.common.jms.JMSOperations)16 SocketPermission (java.net.SocketPermission)13 BatchTestHelper (org.javaee7.util.BatchTestHelper)13 Util (org.jboss.as.test.shared.integration.ejb.security.Util)11 Properties (java.util.Properties)10