use of org.jboss.tools.hibernate.runtime.common.IFacade in project jbosstools-hibernate by jbosstools.
the class ServiceImplTest method testNewJoinedSubclass.
@Test
public void testNewJoinedSubclass() {
IPersistentClass persistentClass = service.newRootClass();
IPersistentClass joinedSubclass = service.newJoinedSubclass(persistentClass);
Assert.assertNotNull(joinedSubclass);
Object target = ((IFacade) joinedSubclass).getTarget();
Assert.assertNotNull(target);
Assert.assertTrue(target instanceof JoinedSubclass);
Assert.assertSame(persistentClass, joinedSubclass.getSuperclass());
Assert.assertSame(((IFacade) persistentClass).getTarget(), ((JoinedSubclass) target).getSuperclass());
}
use of org.jboss.tools.hibernate.runtime.common.IFacade in project jbosstools-hibernate by jbosstools.
the class ServiceImplTest method testNewList.
@Test
public void testNewList() {
IPersistentClass persistentClass = service.newRootClass();
IValue list = service.newList(persistentClass);
Assert.assertNotNull(list);
Object target = ((IFacade) list).getTarget();
Assert.assertNotNull(target);
Assert.assertTrue(target instanceof org.hibernate.mapping.List);
}
use of org.jboss.tools.hibernate.runtime.common.IFacade in project jbosstools-hibernate by jbosstools.
the class ServiceImplTest method testNewManyToOne.
@Test
public void testNewManyToOne() {
ITable table = service.newTable("foo");
IValue manyToOne = service.newManyToOne(table);
Assert.assertNotNull(manyToOne);
Object target = ((IFacade) manyToOne).getTarget();
Assert.assertNotNull(target);
Assert.assertTrue(target instanceof ManyToOne);
}
use of org.jboss.tools.hibernate.runtime.common.IFacade in project jbosstools-hibernate by jbosstools.
the class ServiceImplTest method testNewArray.
@Test
public void testNewArray() {
IPersistentClass persistentClass = service.newRootClass();
IValue array = service.newArray(persistentClass);
Assert.assertNotNull(array);
Object target = ((IFacade) array).getTarget();
Assert.assertNotNull(target);
Assert.assertTrue(target instanceof Array);
}
use of org.jboss.tools.hibernate.runtime.common.IFacade in project jbosstools-hibernate by jbosstools.
the class ServiceImplTest method testNewDefaultConfiguration.
@Test
public void testNewDefaultConfiguration() {
IConfiguration configuration = service.newDefaultConfiguration();
Assert.assertNotNull(configuration);
Object target = ((IFacade) configuration).getTarget();
Assert.assertNotNull(target);
Assert.assertTrue(target instanceof Configuration);
}
Aggregations