use of org.jboss.tools.hibernate.runtime.common.IFacade in project jbosstools-hibernate by jbosstools.
the class ServiceImplTest method testNewPrimitiveArray.
@Test
public void testNewPrimitiveArray() {
IPersistentClass persistentClass = service.newRootClass();
IValue primitiveArray = service.newPrimitiveArray(persistentClass);
Assert.assertNotNull(primitiveArray);
Object target = ((IFacade) primitiveArray).getTarget();
Assert.assertNotNull(target);
Assert.assertTrue(target instanceof PrimitiveArray);
}
use of org.jboss.tools.hibernate.runtime.common.IFacade in project jbosstools-hibernate by jbosstools.
the class ServiceImplTest method testNewRootClass.
@Test
public void testNewRootClass() {
IPersistentClass rootClass = service.newRootClass();
Assert.assertNotNull(rootClass);
Object target = ((IFacade) rootClass).getTarget();
Assert.assertNotNull(target);
Assert.assertTrue(target instanceof RootClass);
}
use of org.jboss.tools.hibernate.runtime.common.IFacade 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());
}
use of org.jboss.tools.hibernate.runtime.common.IFacade 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.common.IFacade in project jbosstools-hibernate by jbosstools.
the class ServiceImplTest method testSimpleValue.
@Test
public void testSimpleValue() {
IValue simpleValue = service.newSimpleValue();
Assert.assertNotNull(simpleValue);
Object target = ((IFacade) simpleValue).getTarget();
Assert.assertNotNull(target);
Assert.assertTrue(target instanceof SimpleValue);
}
Aggregations