use of org.hibernate.cfg.reveng.TableFilter in project jbosstools-hibernate by jbosstools.
the class OverrideRepositoryFacadeTest method testAddTableFilter.
@Test
public void testAddTableFilter() throws Exception {
TableFilter tableFilter = new TableFilter();
ITableFilter tableFilterFacade = FACADE_FACTORY.createTableFilter(tableFilter);
Field tableFiltersField = OverrideRepository.class.getDeclaredField("tableFilters");
tableFiltersField.setAccessible(true);
List<?> tableFilters = (List<?>) tableFiltersField.get(overrideRepository);
Assert.assertTrue(tableFilters.isEmpty());
overrideRepositoryFacade.addTableFilter(tableFilterFacade);
tableFilters = (List<?>) tableFiltersField.get(overrideRepository);
Assert.assertSame(tableFilter, tableFilters.get(0));
}
use of org.hibernate.cfg.reveng.TableFilter in project jbosstools-hibernate by jbosstools.
the class ServiceImplTest method testNewTableFilter.
@Test
public void testNewTableFilter() {
ITableFilter tableFilter = service.newTableFilter();
Assert.assertNotNull(tableFilter);
Object target = ((IFacade) tableFilter).getTarget();
Assert.assertNotNull(target);
Assert.assertTrue(target instanceof TableFilter);
}
use of org.hibernate.cfg.reveng.TableFilter in project jbosstools-hibernate by jbosstools.
the class OverrideRepositoryFacadeTest method testAddTableFilter.
@Test
public void testAddTableFilter() throws Exception {
TableFilter tableFilter = new TableFilter();
ITableFilter tableFilterFacade = FACADE_FACTORY.createTableFilter(tableFilter);
Field tableFiltersField = OverrideRepository.class.getDeclaredField("tableFilters");
tableFiltersField.setAccessible(true);
List<?> tableFilters = (List<?>) tableFiltersField.get(overrideRepository);
Assert.assertTrue(tableFilters.isEmpty());
overrideRepositoryFacade.addTableFilter(tableFilterFacade);
tableFilters = (List<?>) tableFiltersField.get(overrideRepository);
Assert.assertSame(tableFilter, tableFilters.get(0));
}
use of org.hibernate.cfg.reveng.TableFilter in project jbosstools-hibernate by jbosstools.
the class ServiceImplTest method testNewTableFilter.
@Test
public void testNewTableFilter() {
ITableFilter tableFilter = service.newTableFilter();
Assert.assertNotNull(tableFilter);
Object target = ((IFacade) tableFilter).getTarget();
Assert.assertNotNull(target);
Assert.assertTrue(target instanceof TableFilter);
}
use of org.hibernate.cfg.reveng.TableFilter in project jbosstools-hibernate by jbosstools.
the class TableFilterFacadeTest method testSetMatchCatalog.
@Test
public void testSetMatchCatalog() {
TableFilter tableFilter = new TableFilter();
ITableFilter tableFilterFacade = FACADE_FACTORY.createTableFilter(tableFilter);
Assert.assertNotEquals("foo", tableFilter.getMatchCatalog());
tableFilterFacade.setMatchCatalog("foo");
Assert.assertEquals("foo", tableFilter.getMatchCatalog());
}
Aggregations