use of org.jboss.tools.hibernate.runtime.spi.ITable in project jbosstools-hibernate by jbosstools.
the class TableFacadeTest method testGetPrimaryKey.
@Test
public void testGetPrimaryKey() {
PrimaryKey primaryKey = new PrimaryKey();
Table table = new Table();
ITable tableFacade = FACADE_FACTORY.createTable(table);
Assert.assertNull(tableFacade.getPrimaryKey());
table.setPrimaryKey(primaryKey);
IPrimaryKey primaryKeyFacade = tableFacade.getPrimaryKey();
Assert.assertSame(primaryKey, ((IFacade) primaryKeyFacade).getTarget());
}
use of org.jboss.tools.hibernate.runtime.spi.ITable in project jbosstools-hibernate by jbosstools.
the class TableFacadeTest method testGetSchema.
@Test
public void testGetSchema() {
Table table = new Table();
ITable tableFacade = FACADE_FACTORY.createTable(table);
Assert.assertNull(tableFacade.getSchema());
table.setSchema("foo");
Assert.assertEquals("foo", tableFacade.getSchema());
}
use of org.jboss.tools.hibernate.runtime.spi.ITable in project jbosstools-hibernate by jbosstools.
the class TableFacadeTest method testGetRowId.
@Test
public void testGetRowId() {
Table table = new Table();
ITable tableFacade = FACADE_FACTORY.createTable(table);
Assert.assertNull(tableFacade.getRowId());
table.setRowId("foo");
Assert.assertEquals("foo", tableFacade.getRowId());
}
use of org.jboss.tools.hibernate.runtime.spi.ITable in project jbosstools-hibernate by jbosstools.
the class TableFacadeTest method testGetSubselect.
@Test
public void testGetSubselect() {
Table table = new Table();
ITable tableFacade = FACADE_FACTORY.createTable(table);
Assert.assertNull(tableFacade.getSubselect());
table.setSubselect("foo");
Assert.assertEquals("foo", tableFacade.getSubselect());
}
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());
}
Aggregations