Search in sources :

Example 71 with StringAsset

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

the class DefaultResponseCodeAtRootTestCase method deployment.

@Deployment(testable = false, managed = false, name = "test")
public static WebArchive deployment() {
    WebArchive war = ShrinkWrap.create(WebArchive.class, DefaultResponseCodeAtRootTestCase.class.getSimpleName() + ".war");
    war.addClasses(SimpleServlet.class);
    war.addAsWebInfResource(new StringAsset("<jboss-web>" + "<context-root>/</context-root>" + "</jboss-web>"), "jboss-web.xml");
    return war;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 72 with StringAsset

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

the class WeldJpaInjectionTestCase method deploy.

@Deployment
public static Archive<?> deploy() {
    JavaArchive jar = ShrinkWrap.create(JavaArchive.class, ARCHIVE_NAME + ".jar");
    jar.addClasses(WeldJpaInjectionTestCase.class, Employee.class, CdiJpaInjectingBean.class);
    jar.addAsResource(new StringAsset(persistence_xml), "META-INF/persistence.xml");
    jar.addAsManifestResource(EmptyAsset.INSTANCE, "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 73 with StringAsset

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

the class WeldJpaInjectionScopeTestCase method deploy.

@Deployment
public static Archive<?> deploy() {
    EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "cdiPuScope.ear");
    WebArchive war = ShrinkWrap.create(WebArchive.class, "simple.war");
    war.addClasses(WeldJpaInjectionScopeTestCase.class, CdiJpaInjectingBean.class);
    war.addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
    ear.addAsModule(war);
    JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "util.jar");
    jar.addAsResource(new StringAsset(persistence_xml), "META-INF/persistence.xml");
    jar.addClass(Employee.class);
    ear.addAsLibrary(jar);
    return ear;
}
Also used : EnterpriseArchive(org.jboss.shrinkwrap.api.spec.EnterpriseArchive) StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 74 with StringAsset

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

the class ExtensionsInEarDiscoveredTestCase method deploy.

@Deployment
public static Archive<?> deploy() {
    EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "testExtensions.ear");
    WebArchive war = ShrinkWrap.create(WebArchive.class, "testWar.war");
    JavaArchive warLib = ShrinkWrap.create(JavaArchive.class, "testLib.jar");
    warLib.addClasses(MyBean.class, AddBeanExtension.class);
    warLib.add(new StringAsset(AddBeanExtension.class.getName()), "META-INF/services/" + Extension.class.getName());
    war.addAsLibrary(warLib);
    war.addClass(WarSLSB.class);
    war.add(EmptyAsset.INSTANCE, "WEB-INF/beans.xml");
    JavaArchive lib = ShrinkWrap.create(JavaArchive.class, "lib.jar");
    lib.addClasses(ExtensionsInEarDiscoveredTestCase.class, SomeInterface.class);
    ear.addAsLibrary(lib);
    ear.addAsModule(war);
    return ear;
}
Also used : EnterpriseArchive(org.jboss.shrinkwrap.api.spec.EnterpriseArchive) StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 75 with StringAsset

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

the class InterceptorPackagingTestCase method deploy.

@Deployment
public static Archive<?> deploy() {
    final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "interceptortest.ear");
    JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "mod1.jar");
    jar.addClasses(InterceptedBean.class, SimpleEjb.class, InterceptorPackagingTestCase.class);
    jar.addAsManifestResource(new StringAsset("<beans><interceptors><class>" + SimpleInterceptor.class.getName() + "</class></interceptors></beans>"), "beans.xml");
    ear.addAsModule(jar);
    jar = ShrinkWrap.create(JavaArchive.class, "mod2.jar");
    jar.addClasses(SimpleInterceptor.class, SimpleEjb2.class, Intercepted.class);
    jar.addAsManifestResource(new StringAsset("<beans><interceptors><class>" + SimpleInterceptor.class.getName() + "</class></interceptors></beans>"), "beans.xml");
    ear.addAsModule(jar);
    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)

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