use of org.jboss.tools.hibernate.runtime.common.AbstractTableFacade in project jbosstools-hibernate by jbosstools.
the class TableFacadeTest method testIsAbstract.
@Test
public void testIsAbstract() {
Table table = new Table();
ITable tableFacade = new AbstractTableFacade(FACADE_FACTORY, table) {
};
table.setAbstract(true);
assertTrue(tableFacade.isAbstract());
table.setAbstract(false);
assertFalse(tableFacade.isAbstract());
}
use of org.jboss.tools.hibernate.runtime.common.AbstractTableFacade in project jbosstools-hibernate by jbosstools.
the class TableFacadeTest method testGetComment.
@Test
public void testGetComment() {
Table table = new Table();
ITable tableFacade = new AbstractTableFacade(FACADE_FACTORY, table) {
};
assertNull(tableFacade.getComment());
table.setComment("foo");
assertEquals("foo", tableFacade.getComment());
}
use of org.jboss.tools.hibernate.runtime.common.AbstractTableFacade in project jbosstools-hibernate by jbosstools.
the class TableFacadeTest method testGetIdentifierValue.
@Test
public void testGetIdentifierValue() {
Table table = new Table();
ITable tableFacade = new AbstractTableFacade(FACADE_FACTORY, table) {
};
IValue valueFacade = tableFacade.getIdentifierValue();
assertNull(valueFacade);
KeyValue value = new BasicValue(DummyMetadataBuildingContext.INSTANCE);
table.setIdentifierValue(value);
valueFacade = tableFacade.getIdentifierValue();
assertSame(value, ((IFacade) valueFacade).getTarget());
}
use of org.jboss.tools.hibernate.runtime.common.AbstractTableFacade in project jbosstools-hibernate by jbosstools.
the class TableFacadeTest method testGetColumnIterator.
@Test
public void testGetColumnIterator() {
Table table = new Table();
ITable tableFacade = new AbstractTableFacade(FACADE_FACTORY, table) {
};
Iterator<IColumn> columnIterator = tableFacade.getColumnIterator();
assertFalse(columnIterator.hasNext());
Column column = new Column("foo");
table.addColumn(column);
tableFacade = FACADE_FACTORY.createTable(table);
columnIterator = tableFacade.getColumnIterator();
IColumn columnFacade = columnIterator.next();
assertSame(column, ((IFacade) columnFacade).getTarget());
}
use of org.jboss.tools.hibernate.runtime.common.AbstractTableFacade in project jbosstools-hibernate by jbosstools.
the class TableFacadeTest method testGetName.
@Test
public void testGetName() {
Table table = new Table();
ITable tableFacade = new AbstractTableFacade(FACADE_FACTORY, table) {
};
assertNull(tableFacade.getName());
table.setName("foo");
assertEquals("foo", tableFacade.getName());
}
Aggregations