use of org.hibernate.type.ManyToOneType in project jbosstools-hibernate by jbosstools.
the class TypeFacadeTest method testGetAssociatedEntityName.
@Test
public void testGetAssociatedEntityName() {
IType typeFacade = null;
ClassType classType = new ClassType();
typeFacade = FACADE_FACTORY.createType(classType);
Assert.assertNull(typeFacade.getAssociatedEntityName());
EntityType entityType = new ManyToOneType(null, "foo");
typeFacade = FACADE_FACTORY.createType(entityType);
Assert.assertEquals("foo", typeFacade.getAssociatedEntityName());
}
use of org.hibernate.type.ManyToOneType in project jbosstools-hibernate by jbosstools.
the class TypeFacadeTest method testGetAssociatedEntityName.
@Test
public void testGetAssociatedEntityName() {
IType typeFacade = null;
ClassType classType = new ClassType();
typeFacade = FACADE_FACTORY.createType(classType);
Assert.assertNull(typeFacade.getAssociatedEntityName());
EntityType entityType = new ManyToOneType(null, "foo");
typeFacade = FACADE_FACTORY.createType(entityType);
Assert.assertEquals("foo", typeFacade.getAssociatedEntityName());
}
use of org.hibernate.type.ManyToOneType in project jbosstools-hibernate by jbosstools.
the class TypeFacadeTest method testIsOneToOne.
@Test
public void testIsOneToOne() {
IType typeFacade = null;
ClassType classType = new ClassType();
typeFacade = FACADE_FACTORY.createType(classType);
Assert.assertFalse(typeFacade.isOneToOne());
EntityType entityType = new ManyToOneType(null, null);
typeFacade = FACADE_FACTORY.createType(entityType);
Assert.assertFalse(entityType.isOneToOne());
OneToOneType oneToOneType = new OneToOneType(null, null, null, false, null, false, false, null, null);
typeFacade = FACADE_FACTORY.createType(oneToOneType);
Assert.assertTrue(oneToOneType.isOneToOne());
}
use of org.hibernate.type.ManyToOneType in project jbosstools-hibernate by jbosstools.
the class TypeFacadeTest method testGetAssociatedEntityName.
@Test
public void testGetAssociatedEntityName() {
IType typeFacade = null;
ClassType classType = new ClassType();
typeFacade = FACADE_FACTORY.createType(classType);
Assert.assertNull(typeFacade.getAssociatedEntityName());
EntityType entityType = new ManyToOneType(null, "foo");
typeFacade = FACADE_FACTORY.createType(entityType);
Assert.assertEquals("foo", typeFacade.getAssociatedEntityName());
}
use of org.hibernate.type.ManyToOneType in project jbosstools-hibernate by jbosstools.
the class TypeFacadeTest method testIsOneToOne.
@Test
public void testIsOneToOne() {
IType typeFacade = null;
ClassType classType = new ClassType();
typeFacade = FACADE_FACTORY.createType(classType);
Assert.assertFalse(typeFacade.isOneToOne());
EntityType entityType = new ManyToOneType((TypeScope) null, null);
typeFacade = FACADE_FACTORY.createType(entityType);
Assert.assertFalse(entityType.isOneToOne());
OneToOneType oneToOneType = new OneToOneType(null, null, null, false, null, false, false, null, null);
typeFacade = FACADE_FACTORY.createType(oneToOneType);
Assert.assertTrue(oneToOneType.isOneToOne());
}
Aggregations