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 FacadeFactoryTest method testCreateTable.
@Test
public void testCreateTable() {
Table table = new Table();
ITable facade = facadeFactory.createTable(table);
Assert.assertSame(table, ((IFacade) facade).getTarget());
}
use of org.jboss.tools.hibernate.runtime.spi.ITable in project jbosstools-hibernate by jbosstools.
the class ForeignKeyFacadeTest method testGetReferencedTable.
@Test
public void testGetReferencedTable() {
ITable first = foreignKeyFacade.getReferencedTable();
Assert.assertEquals("getReferencedTable", methodName);
Assert.assertArrayEquals(new Object[] {}, arguments);
Assert.assertNull(first);
Table table = new Table();
foreignKey.setReferencedTable(table);
reset();
ITable second = foreignKeyFacade.getReferencedTable();
Assert.assertEquals("getReferencedTable", methodName);
Assert.assertArrayEquals(new Object[] {}, arguments);
Assert.assertNotNull(second);
Assert.assertSame(table, ((IFacade) second).getTarget());
reset();
ITable third = foreignKeyFacade.getReferencedTable();
Assert.assertNull(methodName);
Assert.assertNull(arguments);
Assert.assertSame(second, third);
}
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());
}
Aggregations