use of org.jboss.tools.hibernate.runtime.v_6_0.internal.legacy.ClassType in project jbosstools-hibernate by jbosstools.
the class TypeFacadeTest method testGetName.
@Test
public void testGetName() {
IType typeFacade = null;
ClassType classType = new ClassType();
typeFacade = new TypeFacadeImpl(FACADE_FACTORY, classType) {
};
assertEquals("class", typeFacade.getName());
ArrayType arrayType = new ArrayType("foo", "bar", String.class);
typeFacade = new TypeFacadeImpl(FACADE_FACTORY, arrayType) {
};
assertEquals("[Ljava.lang.String;(foo)", typeFacade.getName());
}
use of org.jboss.tools.hibernate.runtime.v_6_0.internal.legacy.ClassType in project jbosstools-hibernate by jbosstools.
the class TypeFacadeTest method testIsEntityType.
@Test
public void testIsEntityType() {
IType typeFacade = null;
// first try type that is not an entity type
ClassType classType = new ClassType();
typeFacade = new TypeFacadeImpl(FACADE_FACTORY, classType) {
};
assertFalse(typeFacade.isEntityType());
// next try type that is an entity type
EntityType entityType = new ManyToOneType((TypeConfiguration) null, null);
typeFacade = new TypeFacadeImpl(FACADE_FACTORY, entityType) {
};
assertTrue(entityType.isEntityType());
}
use of org.jboss.tools.hibernate.runtime.v_6_0.internal.legacy.ClassType in project jbosstools-hibernate by jbosstools.
the class TypeFacadeTest method testIsCollectionType.
@Test
public void testIsCollectionType() {
IType typeFacade = null;
// first try type that is not a collection type
ClassType classType = new ClassType();
typeFacade = new TypeFacadeImpl(FACADE_FACTORY, classType) {
};
assertFalse(typeFacade.isCollectionType());
// next try a collection type
ArrayType arrayType = new ArrayType(null, null, String.class);
typeFacade = new TypeFacadeImpl(FACADE_FACTORY, arrayType) {
};
assertTrue(typeFacade.isCollectionType());
}
use of org.jboss.tools.hibernate.runtime.v_6_0.internal.legacy.ClassType in project jbosstools-hibernate by jbosstools.
the class TypeFacadeTest method testFromStringValue.
// TODO JBIDE-28154: Investigate failure
@Disabled
@Test
public void testFromStringValue() {
IType typeFacade = null;
// first try type that is string representable
ClassType classType = new ClassType();
typeFacade = new TypeFacadeImpl(FACADE_FACTORY, classType) {
};
assertEquals(TypeFacadeTest.class, typeFacade.fromStringValue(TypeFacadeTest.class.getName()));
// next try type that is not string representable
ArrayType arrayType = new ArrayType("foo", "bar", String.class);
typeFacade = new TypeFacadeImpl(FACADE_FACTORY, arrayType) {
};
assertNull(typeFacade.fromStringValue("just a random string"));
}
use of org.jboss.tools.hibernate.runtime.v_6_0.internal.legacy.ClassType in project jbosstools-hibernate by jbosstools.
the class TypeFacadeTest method testIsIntegerType.
@Test
public void testIsIntegerType() {
IType typeFacade = null;
ClassType classType = new ClassType();
typeFacade = new TypeFacadeImpl(FACADE_FACTORY, classType) {
};
assertFalse(typeFacade.isIntegerType());
IntegerType integerType = new IntegerType();
typeFacade = new TypeFacadeImpl(FACADE_FACTORY, integerType) {
};
assertTrue(typeFacade.isIntegerType());
}
Aggregations