use of org.jboss.tools.hibernate.runtime.spi.ITable in project jbosstools-hibernate by jbosstools.
the class TableFacadeTest method testIsAbstract.
@Test
public void testIsAbstract() {
Table table = new Table();
ITable tableFacade = FACADE_FACTORY.createTable(table);
table.setAbstract(true);
Assert.assertTrue(tableFacade.isAbstract());
table.setAbstract(false);
Assert.assertFalse(tableFacade.isAbstract());
}
use of org.jboss.tools.hibernate.runtime.spi.ITable in project jbosstools-hibernate by jbosstools.
the class TableFacadeTest method testGetColumnIterator.
@Test
public void testGetColumnIterator() {
Table table = new Table();
ITable tableFacade = FACADE_FACTORY.createTable(table);
Iterator<IColumn> columnIterator = tableFacade.getColumnIterator();
Assert.assertFalse(columnIterator.hasNext());
Column column = new Column("foo");
table.addColumn(column);
tableFacade = FACADE_FACTORY.createTable(table);
columnIterator = tableFacade.getColumnIterator();
IColumn columnFacade = columnIterator.next();
Assert.assertSame(column, ((IFacade) columnFacade).getTarget());
}
use of org.jboss.tools.hibernate.runtime.spi.ITable in project jbosstools-hibernate by jbosstools.
the class TableFacadeTest method testGetName.
@Test
public void testGetName() {
Table table = new Table();
ITable tableFacade = FACADE_FACTORY.createTable(table);
Assert.assertNull(tableFacade.getName());
table.setName("foo");
Assert.assertEquals("foo", tableFacade.getName());
}
use of org.jboss.tools.hibernate.runtime.spi.ITable in project jbosstools-hibernate by jbosstools.
the class TableFacadeTest method testGetCatalog.
@Test
public void testGetCatalog() {
Table table = new Table();
ITable tableFacade = FACADE_FACTORY.createTable(table);
Assert.assertNull(tableFacade.getCatalog());
table.setCatalog("foo");
Assert.assertEquals("foo", tableFacade.getCatalog());
}
use of org.jboss.tools.hibernate.runtime.spi.ITable in project jbosstools-hibernate by jbosstools.
the class TableFacadeTest method testIsPhysicalTable.
@Test
public void testIsPhysicalTable() {
Table table = new Table();
ITable tableFacade = FACADE_FACTORY.createTable(table);
table.setSubselect("foo");
Assert.assertFalse(tableFacade.isPhysicalTable());
table.setSubselect(null);
Assert.assertTrue(tableFacade.isPhysicalTable());
}
Aggregations