Search in sources :

Example 21 with StringAsset

use of org.jboss.shrinkwrap.api.asset.StringAsset in project wildfly by wildfly.

the class EEConcurrencySuspendTestCase method deployment.

@Deployment
public static WebArchive deployment() {
    WebArchive war = ShrinkWrap.create(WebArchive.class, "ee-suspend.war");
    war.addPackage(EEConcurrencySuspendTestCase.class.getPackage());
    war.addPackage(HttpRequest.class.getPackage());
    war.addClass(TestSuiteEnvironment.class);
    war.addAsResource(new StringAsset("Dependencies: org.jboss.dmr, org.jboss.as.controller\n"), "META-INF/MANIFEST.MF");
    war.addAsManifestResource(createPermissionsXmlAsset(new RuntimePermission("modifyThread"), new PropertyPermission("management.address", "read"), new PropertyPermission("node0", "read"), new PropertyPermission("jboss.http.port", "read")), "permissions.xml");
    return war;
}
Also used : HttpRequest(org.jboss.as.test.integration.common.HttpRequest) StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) PropertyPermission(java.util.PropertyPermission) WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 22 with StringAsset

use of org.jboss.shrinkwrap.api.asset.StringAsset in project wildfly by wildfly.

the class ObjectMessageTestCase method getDeployment.

/**
     * .ear
     * |
     * |--- ejb.jar
     * |       |--- <classes including the MDB>
     * |
     * |--- lib
     * |      |
     * |      |--- util.jar
     * |      |        |
     * |      |        |--- <classes including the Class whose object is wrapped in an ObjectMessage>
     *
     * @return
     */
@Deployment
public static Archive getDeployment() {
    final JavaArchive ejbJar = ShrinkWrap.create(JavaArchive.class, "ejb.jar");
    ejbJar.addClasses(MDBAcceptingObjectMessageOfArrayType.class, JMSMessagingUtil.class, ObjectMessageTestCase.class, MDBAcceptingObjectMessage.class);
    final JavaArchive libJar = ShrinkWrap.create(JavaArchive.class, "util.jar");
    libJar.addClasses(SimpleMessageInEarLibJar.class);
    libJar.addPackage(JMSOperations.class.getPackage());
    libJar.addClass(JmsQueueSetup.class);
    final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "mdb-objectmessage-test.ear");
    ear.addAsModule(ejbJar);
    ear.addAsLibraries(libJar);
    ear.addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client, org.jboss.dmr \n"), "MANIFEST.MF");
    return ear;
}
Also used : EnterpriseArchive(org.jboss.shrinkwrap.api.spec.EnterpriseArchive) StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) JMSOperations(org.jboss.as.test.integration.common.jms.JMSOperations) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 23 with StringAsset

use of org.jboss.shrinkwrap.api.asset.StringAsset in project wildfly by wildfly.

the class ResourceAdapterNameTestCase method getDeployment.

@Deployment
public static Archive getDeployment() {
    final JavaArchive ejbJar = ShrinkWrap.create(JavaArchive.class, "resource-adapter-name-mdb-test.jar");
    ejbJar.addClasses(OverriddenResourceAdapterNameMDB.class, JMSMessagingUtil.class, ResourceAdapterNameTestCase.class, JmsQueueSetup.class);
    ejbJar.addPackage(JMSOperations.class.getPackage());
    ejbJar.addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client, org.jboss.dmr \n"), "MANIFEST.MF");
    return ejbJar;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) JMSOperations(org.jboss.as.test.integration.common.jms.JMSOperations) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 24 with StringAsset

use of org.jboss.shrinkwrap.api.asset.StringAsset in project wildfly by wildfly.

the class MDBTestCase method getDeployment.

@Deployment
public static Archive getDeployment() {
    final JavaArchive ejbJar = ShrinkWrap.create(JavaArchive.class, "mdb.jar").addPackage(MDBWithDeliveryActiveAnnotation.class.getPackage()).addPackage(JMSOperations.class.getPackage()).addClass(TimeoutUtil.class).addAsManifestResource(MDBWithDeliveryActiveAnnotation.class.getPackage(), "jboss-ejb3.xml", "jboss-ejb3.xml").addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client, org.jboss.dmr \n"), "MANIFEST.MF");
    // grant necessary permissions
    ejbJar.addAsResource(createPermissionsXmlAsset(new PropertyPermission("ts.timeout.factor", "read")), "META-INF/jboss-permissions.xml");
    return ejbJar;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) PropertyPermission(java.util.PropertyPermission) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 25 with StringAsset

use of org.jboss.shrinkwrap.api.asset.StringAsset in project wildfly by wildfly.

the class MDB21TestCase method getDeployment.

@Deployment
public static Archive getDeployment() {
    final JavaArchive ejbJar = ShrinkWrap.create(JavaArchive.class, "mdb.jar");
    ejbJar.addClasses(EJB2xMDB.class, AbstractMDB2xTestCase.class);
    ejbJar.addPackage(JMSOperations.class.getPackage());
    ejbJar.addClasses(JmsQueueSetup.class, TimeoutUtil.class);
    ejbJar.addAsManifestResource(MDB21TestCase.class.getPackage(), "ejb-jar-21.xml", "ejb-jar.xml");
    ejbJar.addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client, org.jboss.dmr \n"), "MANIFEST.MF");
    ejbJar.addAsManifestResource(createPermissionsXmlAsset(new PropertyPermission("ts.timeout.factor", "read")), "jboss-permissions.xml");
    return ejbJar;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) PropertyPermission(java.util.PropertyPermission) JMSOperations(org.jboss.as.test.integration.common.jms.JMSOperations) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Aggregations

StringAsset (org.jboss.shrinkwrap.api.asset.StringAsset)306 Deployment (org.jboss.arquillian.container.test.api.Deployment)248 JavaArchive (org.jboss.shrinkwrap.api.spec.JavaArchive)175 WebArchive (org.jboss.shrinkwrap.api.spec.WebArchive)168 EnterpriseArchive (org.jboss.shrinkwrap.api.spec.EnterpriseArchive)56 OperateOnDeployment (org.jboss.arquillian.container.test.api.OperateOnDeployment)44 ResourceAdapterArchive (org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive)34 AbstractMgmtTestBase (org.jboss.as.test.integration.management.base.AbstractMgmtTestBase)24 PropertyPermission (java.util.PropertyPermission)17 ZipExporterImpl (org.jboss.shrinkwrap.impl.base.exporter.zip.ZipExporterImpl)15 File (java.io.File)14 WebAppDescriptor (org.jboss.shrinkwrap.descriptor.api.webapp30.WebAppDescriptor)14 JMSOperations (org.jboss.as.test.integration.common.jms.JMSOperations)11 CommonCriteria (org.jboss.as.test.categories.CommonCriteria)10 Util (org.jboss.as.test.shared.integration.ejb.security.Util)10 BeforeClass (org.junit.BeforeClass)8 SocketPermission (java.net.SocketPermission)7 Properties (java.util.Properties)7 TargetsContainer (org.jboss.arquillian.container.test.api.TargetsContainer)5 ServerPermission (org.jboss.as.server.security.ServerPermission)5