Examples of BeansXml


Examples of org.jboss.weld.bootstrap.spi.BeansXml

    @Test
    public void testDuplicatesInSingleFileAreNotRemoved() {
        WeldBootstrap weldBootstrap = new WeldBootstrap();

        URL url = getClass().getResource("/org/jboss/weld/tests/unit/bootstrap/xml/beans3.xml");
        BeansXml beansXml = weldBootstrap.parse(Arrays.asList(url), true);

        assertEquals(2, beansXml.getEnabledAlternativeStereotypes().size());
        assertEquals(2, beansXml.getEnabledAlternativeClasses().size());
        assertEquals(2, beansXml.getEnabledInterceptors().size());
        assertEquals(2, beansXml.getEnabledDecorators().size());
    }
View Full Code Here

Examples of org.jboss.weld.bootstrap.spi.BeansXml

        // Create the BDA in which we will deploy Foo. This is equivalent to a ejb
        // jar
        final BeanDeploymentArchiveImpl ejbJar = new BeanDeploymentArchiveImpl("ejb-jar", Basic.class, BasicInterceptor.class, Simple.class);

        // Create the BDA in which we will deploy Bar. This is equivalent to a war
        BeansXml beansXml = new BeansXmlImpl(null, null, null, asList(BasicInterceptor.class.getName()));
        final BeanDeploymentArchiveImpl war = new BeanDeploymentArchiveImpl("war", beansXml, Complex.class);

        // The war can access the ejb jar
        war.getBeanDeploymentArchives().add(ejbJar);
View Full Code Here

Examples of org.jboss.weld.bootstrap.spi.BeansXml

        // Create the BDA in which we will deploy Foo. This is equivalent to a ejb
        // jar
        final BeanDeploymentArchiveImpl ejbJar = new BeanDeploymentArchiveImpl("ejb-jar", Blah.class, BlahDecorator.class, BlahImpl.class);

        // Create the BDA in which we will deploy Bar. This is equivalent to a war
        BeansXml beansXml = new BeansXmlImpl(null, null, asList(BlahDecorator.class.getName()), null);
        final BeanDeploymentArchiveImpl war = new BeanDeploymentArchiveImpl("war", beansXml, BlahImpl2.class);

        // The war can access the ejb jar
        war.getBeanDeploymentArchives().add(ejbJar);
View Full Code Here

Examples of org.jboss.weld.bootstrap.spi.BeansXml

        return bootstrap.parse(BeansXmlParsingTest.class.getResource(filename));
    }

    @Test
    public void testNoSchemaNoAttributes() {
        BeansXml xml = getBeansXml("cdi11-beans1.xml");
        assertEquals(xml.getBeanDiscoveryMode(), BeanDiscoveryMode.ALL);
        assertNull(xml.getVersion());
    }
View Full Code Here

Examples of org.jboss.weld.bootstrap.spi.BeansXml

        assertNull(xml.getVersion());
    }

    @Test
    public void testExplicitVersionAndMode1() {
        BeansXml xml = getBeansXml("cdi11-beans2.xml");
        assertEquals(xml.getBeanDiscoveryMode(), BeanDiscoveryMode.NONE);
        assertEquals(xml.getVersion(), "1.1");
    }
View Full Code Here

Examples of org.jboss.weld.bootstrap.spi.BeansXml

        assertEquals(xml.getVersion(), "1.1");
    }

    @Test
    public void testExplicitVersionAndMode2() {
        BeansXml xml = getBeansXml("cdi11-beans3.xml");
        assertEquals(xml.getBeanDiscoveryMode(), BeanDiscoveryMode.ANNOTATED);
        assertEquals(xml.getVersion(), "1.1");
    }
View Full Code Here

Examples of org.jboss.weld.bootstrap.spi.BeansXml

        assertEquals(xml.getVersion(), "1.1");
    }

    @Test
    public void testExplicitVersionAndMode3() {
        BeansXml xml = getBeansXml("cdi11-beans3b.xml");
        assertEquals(xml.getBeanDiscoveryMode(), BeanDiscoveryMode.ANNOTATED);
        assertEquals(xml.getVersion(), "1.1");
    }
View Full Code Here

Examples of org.jboss.weld.bootstrap.spi.BeansXml

        assertEquals(xml.getVersion(), "1.1");
    }

    @Test
    public void testExplicitVersionAndMode4() {
        BeansXml xml = getBeansXml("cdi11-beans4.xml");
        assertEquals(xml.getBeanDiscoveryMode(), BeanDiscoveryMode.ALL);
        assertEquals(xml.getVersion(), "1.1");
    }
View Full Code Here

Examples of org.jboss.weld.bootstrap.spi.BeansXml

        assertEquals(xml.getVersion(), "1.1");
    }

    @Test
    public void testEmptyFile() {
        BeansXml xml = getBeansXml("cdi11-beans5.xml");
        assertEquals(xml.getBeanDiscoveryMode(), BeanDiscoveryMode.ALL);
        assertNull(xml.getVersion());
    }
View Full Code Here

Examples of org.jboss.weld.bootstrap.spi.BeansXml

        assertNull(xml.getVersion());
    }

    @Test
    public void testExclusionFilters1() {
        BeansXml xml = getBeansXml("cdi11-exclude-beans1.xml");
        Collection<Metadata<Filter>> filters = xml.getScanning().getExcludes();
        assertEquals(filters.size(), 3);
        for (Metadata<Filter> filter : filters) {
            new FilterPredicate(filter, DefaultResourceLoader.INSTANCE);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.