use of org.hibernate.mapping.OneToOne in project jbosstools-hibernate by jbosstools.
the class ServiceImplTest method testNewOneToOne.
@Test
public void testNewOneToOne() {
IPersistentClass persistentClass = service.newRootClass();
IValue oneToOne = service.newOneToOne(persistentClass);
assertNotNull(oneToOne);
Object target = ((IFacade) oneToOne).getTarget();
assertNotNull(target);
assertTrue(target instanceof OneToOne);
}
use of org.hibernate.mapping.OneToOne in project jbosstools-hibernate by jbosstools.
the class ValueFacadeTest method testIsOneToOne.
@Test
public void testIsOneToOne() {
valueTarget = new SimpleValue(null);
valueFacade = FACADE_FACTORY.createValue(valueTarget);
assertFalse(valueFacade.isOneToOne());
OneToOne oneToOne = new OneToOne(null, null, new RootClass(null));
valueFacade = FACADE_FACTORY.createValue(oneToOne);
assertTrue(valueFacade.isOneToOne());
}
use of org.hibernate.mapping.OneToOne in project jbosstools-hibernate by jbosstools.
the class ValueFacadeTest method testIsOneToOne.
@Test
public void testIsOneToOne() {
valueTarget = new SimpleValue(DummyMetadataBuildingContext.INSTANCE, null);
valueFacade = FACADE_FACTORY.createValue(valueTarget);
assertFalse(valueFacade.isOneToOne());
OneToOne oneToOne = new OneToOne(DummyMetadataBuildingContext.INSTANCE, null, new RootClass(null));
valueFacade = FACADE_FACTORY.createValue(oneToOne);
assertTrue(valueFacade.isOneToOne());
}
use of org.hibernate.mapping.OneToOne in project jbosstools-hibernate by jbosstools.
the class ValueFacadeTest method testIsOneToOne.
@Test
public void testIsOneToOne() {
valueTarget = new SimpleValue(null);
valueFacade = FACADE_FACTORY.createValue(valueTarget);
assertFalse(valueFacade.isOneToOne());
OneToOne oneToOne = new OneToOne(null, null, new RootClass());
valueFacade = FACADE_FACTORY.createValue(oneToOne);
assertTrue(valueFacade.isOneToOne());
}
use of org.hibernate.mapping.OneToOne in project jbosstools-hibernate by jbosstools.
the class ValueFacadeTest method testIsOneToOne.
@Test
public void testIsOneToOne() {
valueTarget = new SimpleValue(null);
valueFacade = FACADE_FACTORY.createValue(valueTarget);
assertFalse(valueFacade.isOneToOne());
OneToOne oneToOne = new OneToOne(null, null, new RootClass());
valueFacade = FACADE_FACTORY.createValue(oneToOne);
assertTrue(valueFacade.isOneToOne());
}
Aggregations