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;
}
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;
}
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;
}
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;
}
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;
}
Aggregations