use of org.hibernate.mapping.BasicValue 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.hibernate.mapping.BasicValue 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.hibernate.mapping.BasicValue 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.hibernate.mapping.BasicValue 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());
}
use of org.hibernate.mapping.BasicValue in project jbosstools-hibernate by jbosstools.
the class ValueFacadeTest method testIsOneToOne.
@Test
public void testIsOneToOne() {
valueTarget = new BasicValue(DummyMetadataBuildingContext.INSTANCE);
valueFacade = new AbstractValueFacade(FACADE_FACTORY, valueTarget) {
};
assertFalse(valueFacade.isOneToOne());
OneToOne oneToOne = new OneToOne(DummyMetadataBuildingContext.INSTANCE, null, new RootClass(DummyMetadataBuildingContext.INSTANCE));
valueFacade = new AbstractValueFacade(FACADE_FACTORY, oneToOne) {
};
assertTrue(valueFacade.isOneToOne());
}
Aggregations