use of org.reflections.util.FilterBuilder in project reflections by ronmamo.
the class FilterBuilderTest method test_includePackage.
@Test
public void test_includePackage() {
FilterBuilder filter = new FilterBuilder().includePackage("org.reflections");
assertTrue(filter.apply("org.reflections.Reflections"));
assertTrue(filter.apply("org.reflections.foo.Reflections"));
assertFalse(filter.apply("org.foobar.Reflections"));
}
use of org.reflections.util.FilterBuilder in project reflections by ronmamo.
the class FilterBuilderTest method test_parse_include.
//-----------------------------------------------------------------------
@Test
public void test_parse_include() {
FilterBuilder filter = FilterBuilder.parse("+org.reflections.*");
assertTrue(filter.apply("org.reflections.Reflections"));
assertTrue(filter.apply("org.reflections.foo.Reflections"));
assertFalse(filter.apply("org.foobar.Reflections"));
assertTrue(filter.apply("org.reflectionsplus.Reflections"));
}
use of org.reflections.util.FilterBuilder in project reflections by ronmamo.
the class FilterBuilderTest method test_parsePackages_include_exclude.
@Test
public void test_parsePackages_include_exclude() {
FilterBuilder filter = FilterBuilder.parsePackages("+org.reflections, -org.reflections.foo");
assertTrue(filter.apply("org.reflections.Reflections"));
assertFalse(filter.apply("org.reflections.foo.Reflections"));
assertFalse(filter.apply("org.foobar.Reflections"));
}
use of org.reflections.util.FilterBuilder in project reflections by ronmamo.
the class FilterBuilderTest method test_include.
@Test
public void test_include() {
FilterBuilder filter = new FilterBuilder().include("org\\.reflections.*");
assertTrue(filter.apply("org.reflections.Reflections"));
assertTrue(filter.apply("org.reflections.foo.Reflections"));
assertFalse(filter.apply("org.foobar.Reflections"));
}
use of org.reflections.util.FilterBuilder in project reflections by ronmamo.
the class FilterBuilderTest method test_includePackagebyClass.
@Test
public void test_includePackagebyClass() {
FilterBuilder filter = new FilterBuilder().includePackage(Reflections.class);
assertTrue(filter.apply("org.reflections.Reflections"));
assertTrue(filter.apply("org.reflections.foo.Reflections"));
assertFalse(filter.apply("org.foobar.Reflections"));
}
Aggregations