use of org.apache.cayenne.dbsync.reverse.filters.IncludeTableFilter in project cayenne by apache.
the class DbImporterMojoConfigurationTest method testLoadSchema2.
@Test
public void testLoadSchema2() throws Exception {
FiltersConfig filters = getCdbImport("pom-schema-2.xml").createConfig(mock(Logger.class)).getDbLoaderConfig().getFiltersConfig();
TreeSet<IncludeTableFilter> includes = new TreeSet<>();
includes.add(new IncludeTableFilter(null, new PatternFilter().exclude("^ETL_.*")));
TreeSet<Pattern> excludes = new TreeSet<>(PatternFilter.PATTERN_COMPARATOR);
excludes.add(PatternFilter.pattern("^ETL_.*"));
assertEquals(filters.tableFilter(null, "NHL_STATS"), new TableFilter(includes, excludes));
}
use of org.apache.cayenne.dbsync.reverse.filters.IncludeTableFilter in project cayenne by apache.
the class DbImporterOldMojoConfigurationTest method testLoadSchema2.
public void testLoadSchema2() throws Exception {
FiltersConfig filters = getCdbImport("pom-schema-2.xml").createConfig(mock(Logger.class)).getDbLoaderConfig().getFiltersConfig();
TreeSet<IncludeTableFilter> includes = new TreeSet<>();
includes.add(new IncludeTableFilter(null, new PatternFilter().exclude("^ETL_.*")));
TreeSet<Pattern> excludes = new TreeSet<>(PatternFilter.PATTERN_COMPARATOR);
excludes.add(PatternFilter.pattern("^ETL_.*"));
assertEquals(filters.tableFilter(null, "NHL_STATS"), new TableFilter(includes, excludes));
}
Aggregations