use of org.jboss.weld.environment.se.test.arquillian.WeldSEClassPath in project core by weld.
the class BeanDiscoveryDecorator02Test method getDeployment.
@Deployment(managed = false)
public static Archive<?> getDeployment() {
WeldSEClassPath archives = ShrinkWrap.create(WeldSEClassPath.class);
JavaArchive archive01 = ShrinkWrap.create(BeanArchive.class).addAsManifestResource(new BeansXml(BeanDiscoveryMode.ALL).decorators(ClassicRepresentDecorator.class, ScopedRepresentDecorator.class), "beans.xml").addClasses(Dog.class, Cat.class, ClassicRepresentDecorator.class, ScopedRepresentDecorator.class);
JavaArchive archive02 = ShrinkWrap.create(BeanArchive.class).addAsManifestResource(new BeansXml(BeanDiscoveryMode.ANNOTATED).decorators(ClassicRepresentDecorator.class, ScopedRepresentDecorator.class), "beans.xml").addClasses(Plant.class, Tree.class, Stone.class);
JavaArchive archive03 = ShrinkWrap.create(BeanArchive.class).addAsManifestResource(new BeansXml(BeanDiscoveryMode.NONE).decorators(ClassicRepresentDecorator.class, ScopedRepresentDecorator.class), "beans.xml").addClasses(Flat.class, House.class);
archives.add(archive01);
archives.add(archive02);
archives.add(archive03);
return archives;
}
use of org.jboss.weld.environment.se.test.arquillian.WeldSEClassPath in project core by weld.
the class BeanDiscoveryDecorator03Test method getDeployment.
/**
* Throw exception because of the decorator ClassicRepresentDecorator not discovered, because it has not a bean defining annotation.
*/
@Deployment
@ShouldThrowException(DeploymentException.class)
public static Archive<?> getDeployment() {
WeldSEClassPath archives = ShrinkWrap.create(WeldSEClassPath.class);
JavaArchive archive01 = ShrinkWrap.create(BeanArchive.class).addAsManifestResource(new BeansXml(BeanDiscoveryMode.ALL).decorators(ClassicRepresentDecorator.class, ScopedRepresentDecorator.class), "beans.xml").addClasses(Dog.class, Cat.class);
JavaArchive archive02 = ShrinkWrap.create(BeanArchive.class).addAsManifestResource(new BeansXml(BeanDiscoveryMode.ANNOTATED).decorators(ClassicRepresentDecorator.class, ScopedRepresentDecorator.class), "beans.xml").addClasses(Plant.class, Tree.class, Stone.class, ScopedRepresentDecorator.class);
JavaArchive archive03 = ShrinkWrap.create(BeanArchive.class).addAsManifestResource(new BeansXml(BeanDiscoveryMode.NONE).decorators(ClassicRepresentDecorator.class, ScopedRepresentDecorator.class), "beans.xml").addClasses(Flat.class, House.class, ClassicRepresentDecorator.class);
archives.add(archive01);
archives.add(archive02);
archives.add(archive03);
return archives;
}
use of org.jboss.weld.environment.se.test.arquillian.WeldSEClassPath in project core by weld.
the class BeanDiscoveryInterceptorTest method getDeployment.
@Deployment
public static Archive<?> getDeployment() {
WeldSEClassPath archives = ShrinkWrap.create(WeldSEClassPath.class);
JavaArchive archive01 = ShrinkWrap.create(BeanArchive.class).addAsManifestResource(new BeansXml(BeanDiscoveryMode.ALL).interceptors(ScopedInterceptor.class, ClassicInterceptor.class), "beans.xml").addClasses(Dog.class, Cat.class, ClassicInterceptor.class, ScopedInterceptor.class, InterceptorBindingAnnotation.class);
JavaArchive archive02 = ShrinkWrap.create(BeanArchive.class).addAsManifestResource(new BeansXml(BeanDiscoveryMode.ANNOTATED).interceptors(ScopedInterceptor.class, ClassicInterceptor.class), "beans.xml").addClasses(Plant.class, Tree.class, Stone.class);
JavaArchive archive03 = ShrinkWrap.create(BeanArchive.class).addAsManifestResource(new BeansXml(BeanDiscoveryMode.NONE).interceptors(ScopedInterceptor.class, ClassicInterceptor.class), "beans.xml").addClasses(Flat.class, House.class);
archives.add(archive01);
archives.add(archive02);
archives.add(archive03);
return archives;
}
use of org.jboss.weld.environment.se.test.arquillian.WeldSEClassPath in project core by weld.
the class PriorityTest method getDeployment.
@Deployment(managed = false)
public static Archive<?> getDeployment() {
WeldSEClassPath archives = ShrinkWrap.create(WeldSEClassPath.class);
JavaArchive archive01 = ShrinkWrap.create(BeanArchive.class).addClasses(WhiteNoiseGenerator.class, SoundSource.class, Normalized.class);
JavaArchive archive02 = ShrinkWrap.create(BeanArchive.class).annotated().addClasses(EqualizingDecorator.class, NormalizingInterceptor.class, SineWaveGenerator.class);
archives.add(archive01);
archives.add(archive02);
return archives;
}
use of org.jboss.weld.environment.se.test.arquillian.WeldSEClassPath in project core by weld.
the class IsolationDisabledTest method getDeployment.
@Deployment(managed = false)
public static Archive<?> getDeployment() {
WeldSEClassPath archives = ShrinkWrap.create(WeldSEClassPath.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);
archives.add(archive01);
archives.add(archive02);
return archives;
}
Aggregations