use of org.jboss.tools.hibernate.runtime.spi.IPrimaryKey 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.IPrimaryKey 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 = 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.IPrimaryKey in project jbosstools-hibernate by jbosstools.
the class FacadeFactoryTest method testCreatePrimaryKey.
@Test
public void testCreatePrimaryKey() {
PrimaryKey primaryKey = new PrimaryKey(null);
IPrimaryKey facade = facadeFactory.createPrimaryKey(primaryKey);
Assert.assertSame(primaryKey, ((IFacade) facade).getTarget());
}
use of org.jboss.tools.hibernate.runtime.spi.IPrimaryKey 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 = 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.IPrimaryKey in project jbosstools-hibernate by jbosstools.
the class FacadeFactoryTest method testCreatePrimaryKey.
@Test
public void testCreatePrimaryKey() {
PrimaryKey primaryKey = new PrimaryKey(null);
IPrimaryKey facade = facadeFactory.createPrimaryKey(primaryKey);
Assert.assertSame(primaryKey, ((IFacade) facade).getTarget());
}
Aggregations