use of org.jboss.tools.hibernate.runtime.v_6_0.internal.legacy.ClassType in project jbosstools-hibernate by jbosstools.
the class TypeFacadeTest method testGetPrimitiveClass.
// TODO JBIDE-28154: Investigate failure
@Disabled
@Test
public void testGetPrimitiveClass() {
IType typeFacade = null;
ClassType classType = new ClassType();
typeFacade = new TypeFacadeImpl(FACADE_FACTORY, classType) {
};
assertNull(typeFacade.getPrimitiveClass());
IntegerType integerType = new IntegerType();
typeFacade = new TypeFacadeImpl(FACADE_FACTORY, integerType) {
};
assertEquals(int.class, typeFacade.getPrimitiveClass());
}
use of org.jboss.tools.hibernate.runtime.v_6_0.internal.legacy.ClassType in project jbosstools-hibernate by jbosstools.
the class TypeFacadeTest method testToString.
@Test
public void testToString() {
IType typeFacade = null;
ClassType classType = new ClassType();
typeFacade = new TypeFacadeImpl(FACADE_FACTORY, classType) {
};
assertEquals(TypeFacadeTest.class.getName(), typeFacade.toString(TypeFacadeTest.class));
ArrayType arrayType = new ArrayType("foo", "bar", String.class);
typeFacade = new TypeFacadeImpl(FACADE_FACTORY, arrayType) {
};
assertNull(typeFacade.toString(new String[] { "foo", "bar" }));
}
use of org.jboss.tools.hibernate.runtime.v_6_0.internal.legacy.ClassType in project jbosstools-hibernate by jbosstools.
the class TypeFacadeTest method testGetReturnedClass.
@Test
public void testGetReturnedClass() {
IType typeFacade = null;
ClassType classType = new ClassType();
typeFacade = new TypeFacadeImpl(FACADE_FACTORY, classType) {
};
assertEquals(Class.class.getName(), typeFacade.getReturnedClassName());
ArrayType arrayType = new ArrayType(null, null, String.class);
typeFacade = new TypeFacadeImpl(FACADE_FACTORY, arrayType) {
};
assertEquals(String[].class.getName(), typeFacade.getReturnedClassName());
EntityType entityType = new ManyToOneType((TypeConfiguration) null, "org.foo.bar");
typeFacade = new TypeFacadeImpl(FACADE_FACTORY, entityType);
assertEquals("org.foo.bar", typeFacade.getReturnedClassName());
}
use of org.jboss.tools.hibernate.runtime.v_6_0.internal.legacy.ClassType in project jbosstools-hibernate by jbosstools.
the class TypeFacadeTest method testGetRole.
@Test
public void testGetRole() {
IType typeFacade = null;
ClassType classType = new ClassType();
typeFacade = new TypeFacadeImpl(FACADE_FACTORY, classType) {
};
assertNull(typeFacade.getRole());
ArrayType arrayType = new ArrayType("foo", null, String.class);
typeFacade = new TypeFacadeImpl(FACADE_FACTORY, arrayType) {
};
assertEquals("foo", typeFacade.getRole());
}
use of org.jboss.tools.hibernate.runtime.v_6_0.internal.legacy.ClassType in project jbosstools-hibernate by jbosstools.
the class TypeFacadeTest method testIsInstanceOfPrimitiveType.
// TODO JBIDE-28154: Investigate failure
@Disabled
@Test
public void testIsInstanceOfPrimitiveType() {
IType typeFacade = null;
ClassType classType = new ClassType();
typeFacade = new TypeFacadeImpl(FACADE_FACTORY, classType) {
};
assertFalse(typeFacade.isInstanceOfPrimitiveType());
StringType stringType = new StringType();
typeFacade = new TypeFacadeImpl(FACADE_FACTORY, stringType) {
};
assertFalse(typeFacade.isInstanceOfPrimitiveType());
IntegerType integerType = new IntegerType();
typeFacade = new TypeFacadeImpl(FACADE_FACTORY, integerType) {
};
assertTrue(typeFacade.isInstanceOfPrimitiveType());
}
Aggregations