use of org.hibernate.type.ClassType in project jbosstools-hibernate by jbosstools.
the class TypeFacadeTest method testIsCollectionType.
@Test
public void testIsCollectionType() {
IType typeFacade = null;
ClassType classType = new ClassType();
typeFacade = FACADE_FACTORY.createType(classType);
Assert.assertFalse(typeFacade.isCollectionType());
ArrayType arrayType = new ArrayType(null, null, null, String.class);
typeFacade = FACADE_FACTORY.createType(arrayType);
Assert.assertTrue(typeFacade.isCollectionType());
}
use of org.hibernate.type.ClassType in project jbosstools-hibernate by jbosstools.
the class TypeFacadeTest method testIsAnyType.
@Test
public void testIsAnyType() {
IType typeFacade = null;
ClassType classType = new ClassType();
typeFacade = FACADE_FACTORY.createType(classType);
Assert.assertFalse(typeFacade.isAnyType());
AnyType anyType = new AnyType(null, null, null);
typeFacade = FACADE_FACTORY.createType(anyType);
Assert.assertTrue(typeFacade.isAnyType());
}
use of org.hibernate.type.ClassType in project jbosstools-hibernate by jbosstools.
the class TypeFacadeTest method testGetReturnedClass.
@Test
public void testGetReturnedClass() {
IType typeFacade = null;
ClassType classType = new ClassType();
typeFacade = FACADE_FACTORY.createType(classType);
Assert.assertEquals(Class.class, typeFacade.getReturnedClass());
ArrayType arrayType = new ArrayType(null, null, null, String.class);
typeFacade = FACADE_FACTORY.createType(arrayType);
Assert.assertEquals(String[].class, typeFacade.getReturnedClass());
}
use of org.hibernate.type.ClassType in project jbosstools-hibernate by jbosstools.
the class TypeFacadeTest method testGetRole.
@Test
public void testGetRole() {
IType typeFacade = null;
ClassType classType = new ClassType();
typeFacade = FACADE_FACTORY.createType(classType);
Assert.assertNull(typeFacade.getRole());
ArrayType arrayType = new ArrayType(null, "foo", null, String.class);
typeFacade = FACADE_FACTORY.createType(arrayType);
Assert.assertEquals("foo", typeFacade.getRole());
}
use of org.hibernate.type.ClassType in project jbosstools-hibernate by jbosstools.
the class TypeFacadeTest method testIsComponentType.
@Test
public void testIsComponentType() {
IType typeFacade = null;
ClassType classType = new ClassType();
typeFacade = FACADE_FACTORY.createType(classType);
Assert.assertFalse(typeFacade.isComponentType());
ComponentType componentType = new ComponentType(null, new ComponentMetamodel(new Component(null, new RootClass())));
typeFacade = FACADE_FACTORY.createType(componentType);
Assert.assertTrue(typeFacade.isComponentType());
}
Aggregations