use of org.jboss.tools.hibernate.runtime.spi.IType in project jbosstools-hibernate by jbosstools.
the class TypeFactoryFacadeTest method testGetTimeType.
@SuppressWarnings("deprecation")
@Test
public void testGetTimeType() {
Type typeTarget = Hibernate.TIME;
IType typeFacade = typeFactoryFacade.getTimeType();
Assert.assertSame(typeTarget, ((IFacade) typeFacade).getTarget());
}
use of org.jboss.tools.hibernate.runtime.spi.IType in project jbosstools-hibernate by jbosstools.
the class TypeFactoryFacadeTest method testGetLocaleType.
@SuppressWarnings("deprecation")
@Test
public void testGetLocaleType() {
Type typeTarget = Hibernate.LOCALE;
IType typeFacade = typeFactoryFacade.getLocaleType();
Assert.assertSame(typeTarget, ((IFacade) typeFacade).getTarget());
}
use of org.jboss.tools.hibernate.runtime.spi.IType in project jbosstools-hibernate by jbosstools.
the class FacadeFactoryTest method testCreateType.
@Test
public void testCreateType() {
Type type = (Type) Proxy.newProxyInstance(facadeFactory.getClassLoader(), new Class[] { Type.class }, new TestInvocationHandler());
IType facade = facadeFactory.createType(type);
Assert.assertSame(type, ((IFacade) facade).getTarget());
}
use of org.jboss.tools.hibernate.runtime.spi.IType in project jbosstools-hibernate by jbosstools.
the class ClassMetadataFacadeTest method testGetIdentifierType.
@Test
public void testGetIdentifierType() {
IType identifierType = classMetadata.getIdentifierType();
Assert.assertNotNull(identifierType);
Assert.assertEquals("getIdentifierType", methodName);
Assert.assertNull(arguments);
methodName = null;
Assert.assertSame(identifierType, classMetadata.getIdentifierType());
Assert.assertNull(methodName);
Assert.assertNull(arguments);
}
use of org.jboss.tools.hibernate.runtime.spi.IType in project jbosstools-hibernate by jbosstools.
the class TypeFacadeTest method testIsArrayType.
@Test
public void testIsArrayType() {
IType typeFacade = null;
ClassType classType = new ClassType();
typeFacade = FACADE_FACTORY.createType(classType);
Assert.assertFalse(typeFacade.isArrayType());
BagType bagType = new BagType(null, null, null, false);
typeFacade = FACADE_FACTORY.createType(bagType);
Assert.assertFalse(typeFacade.isArrayType());
ArrayType arrayType = new ArrayType(null, null, null, String.class, false);
typeFacade = FACADE_FACTORY.createType(arrayType);
Assert.assertTrue(typeFacade.isArrayType());
}
Aggregations