use of org.jboss.tools.hibernate.runtime.spi.IPersistentClass 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.spi.IPersistentClass in project jbosstools-hibernate by jbosstools.
the class ServiceImplTest method testNewSpecialRootClass.
@Test
public void testNewSpecialRootClass() {
IProperty property = service.newProperty();
IPersistentClass pc = service.newRootClass();
property.setPersistentClass(pc);
IPersistentClass specialRootClass = service.newSpecialRootClass(property);
Assert.assertNotNull(specialRootClass);
Object target = ((IFacade) specialRootClass).getTarget();
Assert.assertNotNull(target);
Assert.assertTrue(target instanceof RootClass);
Assert.assertSame(property, specialRootClass.getProperty());
}
use of org.jboss.tools.hibernate.runtime.spi.IPersistentClass in project jbosstools-hibernate by jbosstools.
the class ServiceImplTest method testNewMap.
@Test
public void testNewMap() {
IPersistentClass persistentClass = service.newRootClass();
IValue map = service.newMap(persistentClass);
Assert.assertNotNull(map);
Object target = ((IFacade) map).getTarget();
Assert.assertNotNull(target);
Assert.assertTrue(target instanceof Map);
}
use of org.jboss.tools.hibernate.runtime.spi.IPersistentClass in project jbosstools-hibernate by jbosstools.
the class ServiceImplTest method testNewSet.
@Test
public void testNewSet() {
IPersistentClass persistentClass = service.newRootClass();
IValue set = service.newSet(persistentClass);
Assert.assertNotNull(set);
Object target = ((IFacade) set).getTarget();
Assert.assertNotNull(target);
Assert.assertTrue(target instanceof Set);
}
use of org.jboss.tools.hibernate.runtime.spi.IPersistentClass in project jbosstools-hibernate by jbosstools.
the class ServiceImplTest method testNewSingleTableSubclass.
@Test
public void testNewSingleTableSubclass() {
IPersistentClass persistentClass = service.newRootClass();
IPersistentClass singleTableSublass = service.newSingleTableSubclass(persistentClass);
Assert.assertNotNull(singleTableSublass);
Object target = ((IFacade) singleTableSublass).getTarget();
Assert.assertNotNull(target);
Assert.assertTrue(target instanceof SingleTableSubclass);
Assert.assertSame(persistentClass, singleTableSublass.getSuperclass());
Assert.assertSame(((IFacade) persistentClass).getTarget(), ((SingleTableSubclass) target).getSuperclass());
}
Aggregations