use of org.jboss.shrinkwrap.impl.BeansXml in project core by weld.
the class InterceptorDiscoveryTest method createTestArchive.
@Deployment
public static WebArchive createTestArchive() {
WebArchive testArchive = Deployments.baseDeployment().addClass(InterceptorDiscoveryTest.class);
JavaArchive archive01 = ShrinkWrap.create(BeanArchive.class).addAsManifestResource(new BeansXml(BeanDiscoveryMode.ALL).interceptors(ClassicInterceptor.class), "beans.xml").addClasses(Dog.class, Cat.class, InterceptorBindingAnnotation.class);
JavaArchive archive02 = ShrinkWrap.create(BeanArchive.class).addAsManifestResource(new BeansXml(BeanDiscoveryMode.ANNOTATED).interceptors(ClassicInterceptor.class), "beans.xml").addClasses(Plant.class, Tree.class, Stone.class, ClassicInterceptor.class);
JavaArchive archive03 = ShrinkWrap.create(BeanArchive.class).addAsManifestResource(new BeansXml(BeanDiscoveryMode.NONE).interceptors(ClassicInterceptor.class), "beans.xml").addClasses(Flat.class, House.class);
testArchive.addAsLibraries(archive01, archive02, archive03);
return testArchive;
}
use of org.jboss.shrinkwrap.impl.BeansXml in project core by weld.
the class BeanDiscoveryInjectionTest method getDeployment.
@Deployment
public static Archive<?> getDeployment() {
JavaArchive archive01 = ShrinkWrap.create(BeanArchive.class).addAsManifestResource(new BeansXml(BeanDiscoveryMode.ALL), "beans.xml").addClasses(Dog.class, Cat.class, Cow.class);
JavaArchive archive02 = ShrinkWrap.create(BeanArchive.class).addAsManifestResource(new BeansXml(BeanDiscoveryMode.ANNOTATED), "beans.xml").addClasses(Plant.class, Tree.class, Stone.class);
JavaArchive archive03 = ShrinkWrap.create(BeanArchive.class).addAsManifestResource(new BeansXml(BeanDiscoveryMode.NONE), "beans.xml").addClasses(Flat.class, House.class);
return ShrinkWrap.create(WeldSEClassPath.class).add(archive01, archive02, archive03);
}
use of org.jboss.shrinkwrap.impl.BeansXml in project core by weld.
the class IsolationDisabledTest method createTestArchive.
@Deployment
public static WebArchive createTestArchive() {
WebArchive testArchive = Deployments.baseDeployment(new StringAsset(extendDefaultWebXml(toContextParam("org.jboss.weld.environment.servlet.archive.isolation", "false")))).addClass(IsolationDisabledTest.class);
JavaArchive archive01 = ShrinkWrap.create(BeanArchive.class).addAsManifestResource(new BeansXml(BeanDiscoveryMode.ALL).interceptors(ZoomInterceptor.class).decorators(CameraDecorator.class).alternatives(RangefinderCamera.class).excludeFilters(Exclude.exact(PinholeCamera.class).ifClassAvailable(DSLR.class)), "beans.xml").addClasses(ZoomInterceptor.class, CameraDecorator.class, RangefinderCamera.class);
JavaArchive archive02 = ShrinkWrap.create(BeanArchive.class).addAsManifestResource(new BeansXml(BeanDiscoveryMode.ALL), "beans.xml").addClasses(Zoom.class, Camera.class, DSLR.class, PinholeCamera.class);
testArchive.addAsLibraries(archive01, archive02);
return testArchive;
}
use of org.jboss.shrinkwrap.impl.BeansXml in project core by weld.
the class LibrariesDiscoveredTest method createTestArchive.
@Deployment
public static WebArchive createTestArchive() {
JavaArchive library = ShrinkWrap.create(JavaArchive.class, "library.jar").addClass(Camel.class).addAsManifestResource(new BeansXml(), "beans.xml");
log.fine(DELIMITER);
log.fine("Library");
log.fine(DELIMITER);
log.fine(library.toString(true));
return baseDeployment().addClasses(Needle.class, LibrariesDiscoveredTest.class).addAsLibrary(library);
}
use of org.jboss.shrinkwrap.impl.BeansXml in project core by weld.
the class EnhancedListenerShutdownTest method createAssertArchive.
@Deployment(name = ASSERT, managed = false)
public static WebArchive createAssertArchive() {
WebArchive war = ShrinkWrap.create(WebArchive.class, "app-assert.war").addAsWebInfResource(new BeansXml(), "beans.xml").setWebXML(DEFAULT_WEB_XML);
war.addClasses(InfoServlet.class, ActionSequence.class);
return war;
}
Aggregations