use of org.jboss.tools.hibernate.runtime.common.AbstractValueFacade in project jbosstools-hibernate by jbosstools.
the class ValueFacadeTest method testGetType.
// TODO JBIDE-28154: Investigate failure
@Disabled
@Test
public void testGetType() {
SimpleValue valueTarget = new BasicValue(DummyMetadataBuildingContext.INSTANCE);
valueTarget.setTypeName("java.lang.Integer");
valueFacade = new AbstractValueFacade(FACADE_FACTORY, valueTarget) {
};
IType typeFacade = valueFacade.getType();
assertEquals("org.hibernate.type.IntegerType", ((IFacade) typeFacade).getTarget().getClass().getName());
}
use of org.jboss.tools.hibernate.runtime.common.AbstractValueFacade in project jbosstools-hibernate by jbosstools.
the class ValueFacadeTest method testIsCollection.
@Test
public void testIsCollection() {
valueTarget = new BasicValue(DummyMetadataBuildingContext.INSTANCE);
valueFacade = new AbstractValueFacade(FACADE_FACTORY, valueTarget) {
};
assertFalse(valueFacade.isCollection());
valueTarget = new Set(DummyMetadataBuildingContext.INSTANCE, null);
valueFacade = new AbstractValueFacade(FACADE_FACTORY, valueTarget) {
};
assertTrue(valueFacade.isCollection());
}
use of org.jboss.tools.hibernate.runtime.common.AbstractValueFacade in project jbosstools-hibernate by jbosstools.
the class ValueFacadeTest method testGetTypeName.
@Test
public void testGetTypeName() {
SimpleValue valueTarget = new BasicValue(DummyMetadataBuildingContext.INSTANCE);
valueFacade = new AbstractValueFacade(FACADE_FACTORY, valueTarget) {
};
assertNull(valueFacade.getTypeName());
valueTarget.setTypeName("org.foo.Bar");
assertEquals("org.foo.Bar", valueFacade.getTypeName());
}
use of org.jboss.tools.hibernate.runtime.common.AbstractValueFacade in project jbosstools-hibernate by jbosstools.
the class ValueFacadeTest method testGetElementClassName.
@Test
public void testGetElementClassName() {
Array valueTarget = new Array(DummyMetadataBuildingContext.INSTANCE, null);
valueFacade = new AbstractValueFacade(FACADE_FACTORY, valueTarget) {
};
assertNull(valueFacade.getElementClassName());
valueTarget.setElementClassName("org.foo.Bar");
assertEquals("org.foo.Bar", valueFacade.getElementClassName());
;
}
use of org.jboss.tools.hibernate.runtime.common.AbstractValueFacade in project jbosstools-hibernate by jbosstools.
the class ValueFacadeTest method testIsAny.
@Test
public void testIsAny() {
SimpleValue simpleValueTarget = new BasicValue(DummyMetadataBuildingContext.INSTANCE);
valueFacade = new AbstractValueFacade(FACADE_FACTORY, simpleValueTarget) {
};
assertFalse(valueFacade.isAny());
Any anyTarget = new Any(DummyMetadataBuildingContext.INSTANCE, null);
valueFacade = new AbstractValueFacade(FACADE_FACTORY, anyTarget) {
};
assertTrue(valueFacade.isAny());
}
Aggregations