Search in sources :

Example 76 with StringAsset

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

the class EjbConstructorInjectionTestCase method deploy.

@Deployment
public static Archive<?> deploy() {
    JavaArchive jar = ShrinkWrap.create(JavaArchive.class);
    jar.addPackage(EjbConstructorInjectionTestCase.class.getPackage());
    jar.addAsManifestResource(new StringAsset(""), "beans.xml");
    return jar;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 77 with StringAsset

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

the class CDIInjectionIntoEJBInterceptorTestCase method deploy.

@Deployment
public static Archive<?> deploy() {
    JavaArchive jar = ShrinkWrap.create(JavaArchive.class);
    jar.addPackage(CDIInjectionIntoEJBInterceptorTestCase.class.getPackage());
    jar.addAsManifestResource(new StringAsset(""), "beans.xml");
    return jar;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 78 with StringAsset

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

the class StatefulFailoverTestCase method createDeployment.

private static WebArchive createDeployment() {
    WebArchive war = ShrinkWrap.create(WebArchive.class, MODULE_NAME + ".war");
    war.addPackage(Incrementor.class.getPackage());
    war.addPackage(StatefulServlet.class.getPackage());
    war.addPackage(EJBDirectory.class.getPackage());
    war.setWebXML(StatefulServlet.class.getPackage(), "web.xml");
    war.addAsWebInfResource(new StringAsset("<beans>" + "<interceptors><class>" + IncrementorDDInterceptor.class.getName() + "</class></interceptors>" + "<decorators><class>" + CounterDecorator.class.getName() + "</class></decorators>" + "</beans>"), "beans.xml");
    war.addAsResource(PersistenceIncrementorBean.class.getPackage(), "persistence.xml", "/META-INF/persistence.xml");
    return war;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) PersistenceIncrementorBean(org.jboss.as.test.clustering.cluster.ejb.stateful.bean.PersistenceIncrementorBean) Incrementor(org.jboss.as.test.clustering.cluster.ejb.stateful.bean.Incrementor) CounterDecorator(org.jboss.as.test.clustering.cluster.ejb.stateful.bean.CounterDecorator) EJBDirectory(org.jboss.as.test.clustering.ejb.EJBDirectory) StatefulServlet(org.jboss.as.test.clustering.cluster.ejb.stateful.servlet.StatefulServlet)

Example 79 with StringAsset

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

the class StatefulWithXPCFailoverTestCase method createDeployment.

private static Archive<?> createDeployment() {
    WebArchive war = ShrinkWrap.create(WebArchive.class, StatefulBean.MODULE + ".war");
    war.addPackage(StatefulBean.class.getPackage());
    war.addPackage(StatefulServlet.class.getPackage());
    war.addPackage(EJBDirectory.class.getPackage());
    war.setWebXML(StatefulServlet.class.getPackage(), "web.xml");
    war.addAsResource(new StringAsset(persistence_xml), "META-INF/persistence.xml");
    return war;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) StatefulBean(org.jboss.as.test.clustering.cluster.ejb.xpc.bean.StatefulBean) WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) EJBDirectory(org.jboss.as.test.clustering.ejb.EJBDirectory) StatefulServlet(org.jboss.as.test.clustering.cluster.ejb.xpc.servlet.StatefulServlet)

Example 80 with StringAsset

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

the class SingletonServiceTestCase method createDeployment.

private static Archive<?> createDeployment() {
    WebArchive war = ShrinkWrap.create(WebArchive.class, "singleton.war");
    war.addPackage(NodeService.class.getPackage());
    war.setManifest(new StringAsset("Manifest-Version: 1.0\nDependencies: org.jboss.as.server\n"));
    war.addAsManifestResource(createPermissionsXmlAsset(// See org.jboss.as.server.deployment.service.ServiceActivatorProcessor#deploy()
    new RuntimePermission("getClassLoader"), // See org.jboss.as.server.deployment.service.SecuredServiceRegistry
    new ServerPermission("useServiceRegistry"), new ServerPermission("getCurrentServiceContainer")), "permissions.xml");
    war.addAsServiceProvider(org.jboss.msc.service.ServiceActivator.class, NodeServiceActivator.class);
    return war;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) NodeService(org.jboss.as.test.clustering.cluster.singleton.service.NodeService) ServerPermission(org.jboss.as.server.security.ServerPermission)

Aggregations

StringAsset (org.jboss.shrinkwrap.api.asset.StringAsset)319 Deployment (org.jboss.arquillian.container.test.api.Deployment)259 JavaArchive (org.jboss.shrinkwrap.api.spec.JavaArchive)180 WebArchive (org.jboss.shrinkwrap.api.spec.WebArchive)180 EnterpriseArchive (org.jboss.shrinkwrap.api.spec.EnterpriseArchive)60 OperateOnDeployment (org.jboss.arquillian.container.test.api.OperateOnDeployment)44 ResourceAdapterArchive (org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive)38 WebAppDescriptor (org.jboss.shrinkwrap.descriptor.api.webapp30.WebAppDescriptor)25 AbstractMgmtTestBase (org.jboss.as.test.integration.management.base.AbstractMgmtTestBase)24 File (java.io.File)17 PropertyPermission (java.util.PropertyPermission)17 ZipExporterImpl (org.jboss.shrinkwrap.impl.base.exporter.zip.ZipExporterImpl)15 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 Test (org.junit.Test)8 SocketPermission (java.net.SocketPermission)7 Properties (java.util.Properties)7 Runner (org.apache.openejb.arquillian.tests.Runner)7