Package org.jboss.cdi.tck.shrinkwrap.descriptors

Examples of org.jboss.cdi.tck.shrinkwrap.descriptors.Beans11DescriptorImpl


    @Deployment
    public static WebArchive createTestArchive() {
        return new WebArchiveBuilder()
                .withBeansXml(
                        new Beans11DescriptorImpl().alternatives(new BeansXmlClass(FooProducer.class), new BeansXmlClass(
                                BarProducer.class))).withTestClassPackage(AmbiguousDependencyResolutionTest.class).build();
    }
View Full Code Here


        return new WebArchiveBuilder()
                .withTestClass(GlobalDecoratorOrderingTest.class)
                .withClasses(DecoratedImpl.class, LegacyDecorator1.class, LegacyDecorator2.class, LegacyDecorator3.class,
                        WebApplicationGlobalDecorator.class)
                .withBeansXml(
                        new Beans11DescriptorImpl().decorators(
                                //
                                new BeansXmlClass(LegacyDecorator1.class), new BeansXmlClass(LegacyDecorator2.class),
                                new BeansXmlClass(LegacyDecorator3.class),
                                // Disable GED3
                                new BeansXmlClass(GloballyEnabledDecorator3.class, false),
                                // Enabled GPD1
                                new BeansXmlClass(GloballyPrioritizedDecorator1.class, true),
                                //
                                new BeansXmlClass(GloballyEnabledDecorator5.class),
                                // Enabled WAGD globally
                                new BeansXmlClass(WebApplicationGlobalDecorator.class, 1008)))
                .withBeanLibrary(
                        new Beans11DescriptorImpl().decorators(
                        // globally enabled decorators
                                new BeansXmlClass(GloballyEnabledDecorator4.class, 1025), new BeansXmlClass(
                                        GloballyEnabledDecorator5.class, 800), new BeansXmlClass(
                                        GloballyEnabledDecorator1.class, 995), new BeansXmlClass(
                                        GloballyEnabledDecorator2.class, 1005), new BeansXmlClass(
View Full Code Here

                .withTestClass(GlobalInterceptorOrderingTest.class)
                // WEB-INF/classes
                .withClasses(Dao.class, LegacyInterceptor1.class, LegacyInterceptor2.class, LegacyInterceptor3.class,
                        WebApplicationGlobalInterceptor1.class)
                .withBeansXml(
                        new Beans11DescriptorImpl().interceptors(
                                //
                                new BeansXmlClass(LegacyInterceptor1.class), new BeansXmlClass(LegacyInterceptor2.class),
                                new BeansXmlClass(LegacyInterceptor3.class),
                                // Disable GEI3
                                new BeansXmlClass(GloballyEnabledInterceptor3.class, false),
                                // Enabled GPI1
                                new BeansXmlClass(GloballyPrioritizedInterceptor1.class, true),
                                // Override global configuration
                                new BeansXmlClass(GloballyEnabledInterceptor5.class),
                                // Enabled WAGI globally
                                new BeansXmlClass(WebApplicationGlobalInterceptor1.class, 1008)))
                .withBeanLibrary(
                        new Beans11DescriptorImpl().interceptors(
                        // globally enabled interceptors
                                new BeansXmlClass(GloballyEnabledInterceptor4.class, 1025), new BeansXmlClass(
                                        GloballyEnabledInterceptor5.class, 800), new BeansXmlClass(
                                        GloballyEnabledInterceptor1.class, 995), new BeansXmlClass(
                                        GloballyEnabledInterceptor3.class, 1015),
                                // decorators with globally set priority (but disabled)
                                new BeansXmlClass(GloballyPrioritizedInterceptor1.class, false, 1015), new BeansXmlClass(
                                        GloballyPrioritizedInterceptor2.class, false, 1020)), Transactional.class,
                        AbstractInterceptor.class, Service.class, GloballyEnabledInterceptor1.class,
                        GloballyEnabledInterceptor3.class, GloballyEnabledInterceptor4.class,
                        GloballyEnabledInterceptor5.class, GloballyPrioritizedInterceptor1.class,
                        GloballyPrioritizedInterceptor2.class)
                .withBeanLibrary(
                        // globally enabled interceptors
                        new Beans11DescriptorImpl().interceptors(new BeansXmlClass(GloballyEnabledInterceptor2.class, 1005)),
                        GloballyEnabledInterceptor2.class).build();
    }
View Full Code Here

    @Deployment
    public static WebArchive createTestArchive() {
        return new WebArchiveBuilder()
                .withBeansXml(
                        new Beans11DescriptorImpl().alternatives(new BeansXmlClass(FooProducer.class), new BeansXmlClass(
                                BarProducer.class))).withTestClassPackage(AmbiguousDependencyResolutionTest.class).build();
    }
View Full Code Here

        return new WebArchiveBuilder()
                .withTestClass(GlobalDecoratorOrderingTest.class)
                .withClasses(DecoratedImpl.class, LegacyDecorator1.class, LegacyDecorator2.class, LegacyDecorator3.class,
                        WebApplicationGlobalDecorator.class)
                .withBeansXml(
                        new Beans11DescriptorImpl().decorators(
                                //
                                new BeansXmlClass(LegacyDecorator1.class), new BeansXmlClass(LegacyDecorator2.class),
                                new BeansXmlClass(LegacyDecorator3.class),
                                // Disable GED3
                                new BeansXmlClass(GloballyEnabledDecorator3.class, false),
                                // Enabled GPD1
                                new BeansXmlClass(GloballyPrioritizedDecorator1.class, true),
                                //
                                new BeansXmlClass(GloballyEnabledDecorator5.class),
                                // Enabled WAGD globally
                                new BeansXmlClass(WebApplicationGlobalDecorator.class, 1008)))
                .withBeanLibrary(
                        new Beans11DescriptorImpl().decorators(
                        // globally enabled decorators
                                new BeansXmlClass(GloballyEnabledDecorator4.class, 1025), new BeansXmlClass(
                                        GloballyEnabledDecorator5.class, 800), new BeansXmlClass(
                                        GloballyEnabledDecorator1.class, 995), new BeansXmlClass(
                                        GloballyEnabledDecorator2.class, 1005), new BeansXmlClass(
View Full Code Here

        return createBuilderBase()
                .withTestClass(ResourceAlternative04Test.class)
                .withLibrary(ProductionReady.class)
                .withClasses(Alpha.class, ResourceProducer.class)
                .withBeanLibrary(
                        new Beans11DescriptorImpl().alternatives(new BeansXmlClass(BravoResourceProducer.class, 1000)),
                        Bravo.class, BravoResourceProducer.class)
                .withBeanLibrary(
                        new Beans11DescriptorImpl().alternatives(new BeansXmlClass(CharlieResourceProducer.class, 1100)),
                        Charlie.class, CharlieResourceProducer.class)
                .withWebXml(
                        Descriptors.create(WebAppDescriptor.class).createEnvEntry().envEntryName("test1")
                                .envEntryType("java.lang.String").envEntryValue("hello1").up().createEnvEntry()
                                .envEntryName("test2").envEntryType("java.lang.String").envEntryValue("hello2").up()
View Full Code Here

        return createBuilderBase()
                .withTestClass(ResourceAlternative05Test.class)
                .withLibrary(ProductionReady.class)
                .withClasses(Alpha.class, ResourceProducer.class)
                .withBeanLibrary(
                        new Beans11DescriptorImpl().alternatives(new BeansXmlClass(BravoResourceProducer.class, 1000)),
                        Bravo.class, BravoResourceProducer.class)
                .withBeanLibrary(
                        new Beans11DescriptorImpl().alternatives(new BeansXmlClass(CharlieResourceProducer.class, false, 1100)),
                        Charlie.class, CharlieResourceProducer.class)
                .withWebXml(
                        Descriptors.create(WebAppDescriptor.class).createEnvEntry().envEntryName("test1")
                                .envEntryType("java.lang.String").envEntryValue("hello1").up().createEnvEntry()
                                .envEntryName("test2").envEntryType("java.lang.String").envEntryValue("hello2").up()
View Full Code Here

    @Deployment
    public static WebArchive createTestArchive() {
        return createBuilderBase()
                .withTestClass(ResourceAlternative03Test.class)
                .withBeansXml(new Beans11DescriptorImpl().alternatives(new BeansXmlClass(BravoResourceProducer.class, true)))
                .withLibrary(ProductionReady.class)
                .withClasses(Alpha.class)
                .withBeanLibrary(
                        new Beans11DescriptorImpl().alternatives(new BeansXmlClass(BravoResourceProducer.class, false, 1000)),
                        Bravo.class, BravoResourceProducer.class)
                .withBeanLibrary(Charlie.class)
                .withWebXml(
                        Descriptors.create(WebAppDescriptor.class).createEnvEntry().envEntryName("test1")
                                .envEntryType("java.lang.String").envEntryValue("hello").up()).build();
View Full Code Here

        return createBuilderBase()
                .withTestClass(ResourceAlternative01Test.class)
                .withLibrary(ProductionReady.class)
                .withClasses(Alpha.class)
                .withBeanLibrary(
                        new Beans11DescriptorImpl().alternatives(new BeansXmlClass(BravoResourceProducer.class, 1000)),
                        Bravo.class, BravoResourceProducer.class)
                .withBeanLibrary(Charlie.class)
                .withWebXml(
                        Descriptors.create(WebAppDescriptor.class).createEnvEntry().envEntryName("test1")
                                .envEntryType("java.lang.String").envEntryValue("hello").up()).build();
View Full Code Here

    @Deployment
    public static WebArchive createTestArchive() {
        return createBuilderBase()
                .withTestClass(ResourceAlternative02Test.class)
                .withBeansXml(new Beans11DescriptorImpl().alternatives(new BeansXmlClass(BravoResourceProducer.class, false)))
                .withLibrary(ProductionReady.class)
                .withClasses(Alpha.class)
                .withBeanLibrary(
                        new Beans11DescriptorImpl().alternatives(new BeansXmlClass(BravoResourceProducer.class, 1000)),
                        Bravo.class, BravoResourceProducer.class)
                .withBeanLibrary(Charlie.class)
                .withWebXml(
                        Descriptors.create(WebAppDescriptor.class).createEnvEntry().envEntryName("test1")
                                .envEntryType("java.lang.String").envEntryValue("hello").up()).build();
View Full Code Here

TOP

Related Classes of org.jboss.cdi.tck.shrinkwrap.descriptors.Beans11DescriptorImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.