use of org.jboss.tools.hibernate.runtime.common.AbstractTableFacade in project jbosstools-hibernate by jbosstools.
the class TableFacadeTest method testGetSchema.
@Test
public void testGetSchema() {
Table table = new Table();
ITable tableFacade = new AbstractTableFacade(FACADE_FACTORY, table) {
};
assertNull(tableFacade.getSchema());
table.setSchema("foo");
assertEquals("foo", tableFacade.getSchema());
}
use of org.jboss.tools.hibernate.runtime.common.AbstractTableFacade in project jbosstools-hibernate by jbosstools.
the class TableFacadeTest method testGetRowId.
@Test
public void testGetRowId() {
Table table = new Table();
ITable tableFacade = new AbstractTableFacade(FACADE_FACTORY, table) {
};
assertNull(tableFacade.getRowId());
table.setRowId("foo");
assertEquals("foo", tableFacade.getRowId());
}
use of org.jboss.tools.hibernate.runtime.common.AbstractTableFacade in project jbosstools-hibernate by jbosstools.
the class TableFacadeTest method testGetPrimaryKey.
@Test
public void testGetPrimaryKey() {
Table table = new Table();
PrimaryKey primaryKey = new PrimaryKey(table);
ITable tableFacade = new AbstractTableFacade(FACADE_FACTORY, table) {
};
assertNull(tableFacade.getPrimaryKey());
table.setPrimaryKey(primaryKey);
IPrimaryKey primaryKeyFacade = tableFacade.getPrimaryKey();
assertSame(primaryKey, ((IFacade) primaryKeyFacade).getTarget());
}
use of org.jboss.tools.hibernate.runtime.common.AbstractTableFacade in project jbosstools-hibernate by jbosstools.
the class TableFacadeTest method testHasDenormalizedTables.
@Test
public void testHasDenormalizedTables() throws Exception {
Table table = new Table();
ITable tableFacade = new AbstractTableFacade(FACADE_FACTORY, table) {
};
assertFalse(tableFacade.hasDenormalizedTables());
Method method = Table.class.getDeclaredMethod("setHasDenormalizedTables", new Class[] {});
method.setAccessible(true);
method.invoke(table, new Object[] {});
assertTrue(tableFacade.hasDenormalizedTables());
}
use of org.jboss.tools.hibernate.runtime.common.AbstractTableFacade in project jbosstools-hibernate by jbosstools.
the class TableFacadeTest method testGetSubselect.
@Test
public void testGetSubselect() {
Table table = new Table();
ITable tableFacade = new AbstractTableFacade(FACADE_FACTORY, table) {
};
assertNull(tableFacade.getSubselect());
table.setSubselect("foo");
assertEquals("foo", tableFacade.getSubselect());
}
Aggregations