Search in sources :

Example 1 with FilterPredicate

use of org.jboss.weld.metadata.FilterPredicate in project core by weld.

the class BeansXmlParsingTest method testExclusionFilters2.

@Test(expectedExceptions = Exception.class)
public void testExclusionFilters2() {
    BeansXml xml = getBeansXml("cdi11-exclude-beans2.xml");
    Collection<Metadata<Filter>> filters = xml.getScanning().getExcludes();
    assertEquals(filters.size(), 1);
    for (Metadata<Filter> filter : filters) {
        new FilterPredicate(filter, DefaultResourceLoader.INSTANCE);
    }
}
Also used : Filter(org.jboss.weld.bootstrap.spi.Filter) BeansXml(org.jboss.weld.bootstrap.spi.BeansXml) Metadata(org.jboss.weld.bootstrap.spi.Metadata) FilterPredicate(org.jboss.weld.metadata.FilterPredicate) Test(org.testng.annotations.Test)

Example 2 with FilterPredicate

use of org.jboss.weld.metadata.FilterPredicate in project core by weld.

the class BeansXmlParsingTest method testExclusionFilters1.

@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);
    }
}
Also used : Filter(org.jboss.weld.bootstrap.spi.Filter) BeansXml(org.jboss.weld.bootstrap.spi.BeansXml) Metadata(org.jboss.weld.bootstrap.spi.Metadata) FilterPredicate(org.jboss.weld.metadata.FilterPredicate) Test(org.testng.annotations.Test)

Aggregations

BeansXml (org.jboss.weld.bootstrap.spi.BeansXml)2 Filter (org.jboss.weld.bootstrap.spi.Filter)2 Metadata (org.jboss.weld.bootstrap.spi.Metadata)2 FilterPredicate (org.jboss.weld.metadata.FilterPredicate)2 Test (org.testng.annotations.Test)2