use of org.jboss.tools.hibernate.runtime.spi.ITableFilter in project jbosstools-hibernate by jbosstools.
the class TableFilterFacadeTest method testSetMatchName.
@Test
public void testSetMatchName() {
TableFilter tableFilter = new TableFilter();
ITableFilter tableFilterFacade = FACADE_FACTORY.createTableFilter(tableFilter);
Assert.assertNotEquals("foo", tableFilter.getMatchName());
tableFilterFacade.setMatchName("foo");
Assert.assertEquals("foo", tableFilter.getMatchName());
}
use of org.jboss.tools.hibernate.runtime.spi.ITableFilter in project jbosstools-hibernate by jbosstools.
the class TableFilterFacadeTest method testGetMatchSchema.
@Test
public void testGetMatchSchema() {
TableFilter tableFilter = new TableFilter();
ITableFilter tableFilterFacade = FACADE_FACTORY.createTableFilter(tableFilter);
Assert.assertNotEquals("foo", tableFilterFacade.getMatchSchema());
tableFilter.setMatchSchema("foo");
Assert.assertEquals("foo", tableFilterFacade.getMatchSchema());
}
use of org.jboss.tools.hibernate.runtime.spi.ITableFilter 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.jboss.tools.hibernate.runtime.spi.ITableFilter in project jbosstools-hibernate by jbosstools.
the class FacadeFactoryTest method testCreateTableFilter.
@Test
public void testCreateTableFilter() {
TableFilter tableFilter = new TableFilter();
ITableFilter facade = facadeFactory.createTableFilter(tableFilter);
Assert.assertSame(tableFilter, ((IFacade) facade).getTarget());
}
use of org.jboss.tools.hibernate.runtime.spi.ITableFilter 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));
}
Aggregations