use of org.hibernate.mapping.ManyToOne in project jbosstools-hibernate by jbosstools.
the class ValueFacadeTest method testGetReferencedEntityName.
@Test
public void testGetReferencedEntityName() {
ManyToOne valueTarget = new ManyToOne(null, null);
valueFacade = FACADE_FACTORY.createValue(valueTarget);
Assert.assertNull(valueFacade.getReferencedEntityName());
valueTarget.setReferencedEntityName("Foo");
Assert.assertEquals("Foo", valueFacade.getReferencedEntityName());
}
use of org.hibernate.mapping.ManyToOne in project jbosstools-hibernate by jbosstools.
the class ValueFacadeTest method testSetFetchModeJoin.
@Test
public void testSetFetchModeJoin() {
SimpleValue simpleValueTarget = new SimpleValue(null);
Assert.assertNotEquals(FetchMode.JOIN, simpleValueTarget.getFetchMode());
valueFacade = FACADE_FACTORY.createValue(simpleValueTarget);
valueFacade.setFetchModeJoin();
Assert.assertNotEquals(FetchMode.JOIN, simpleValueTarget.getFetchMode());
Collection collectionTarget = new Bag(null, null);
Assert.assertNotEquals(FetchMode.JOIN, collectionTarget.getFetchMode());
valueFacade = FACADE_FACTORY.createValue(collectionTarget);
valueFacade.setFetchModeJoin();
Assert.assertEquals(FetchMode.JOIN, collectionTarget.getFetchMode());
ManyToOne manyToOneTarget = new ManyToOne(null, null);
Assert.assertNotEquals(FetchMode.JOIN, manyToOneTarget.getFetchMode());
valueFacade = FACADE_FACTORY.createValue(manyToOneTarget);
valueFacade.setFetchModeJoin();
Assert.assertEquals(FetchMode.JOIN, manyToOneTarget.getFetchMode());
}
use of org.hibernate.mapping.ManyToOne in project jbosstools-hibernate by jbosstools.
the class ValueFacadeTest method testSetReferencedEntityName.
@Test
public void testSetReferencedEntityName() {
ManyToOne valueTarget = new ManyToOne(null, null);
valueFacade = FACADE_FACTORY.createValue(valueTarget);
Assert.assertNull(valueTarget.getReferencedEntityName());
valueFacade.setReferencedEntityName("Foo");
Assert.assertEquals("Foo", valueTarget.getReferencedEntityName());
}
use of org.hibernate.mapping.ManyToOne in project jbosstools-hibernate by jbosstools.
the class ValueFacadeTest method testGetReferencedEntityName.
@Test
public void testGetReferencedEntityName() {
ManyToOne valueTarget = new ManyToOne(null, null);
valueFacade = FACADE_FACTORY.createValue(valueTarget);
Assert.assertNull(valueFacade.getReferencedEntityName());
valueTarget.setReferencedEntityName("Foo");
Assert.assertEquals("Foo", valueFacade.getReferencedEntityName());
}
use of org.hibernate.mapping.ManyToOne in project jbosstools-hibernate by jbosstools.
the class ValueFacadeTest method testSetFetchModeJoin.
@Test
public void testSetFetchModeJoin() {
SimpleValue simpleValueTarget = new SimpleValue(null);
Assert.assertNotEquals(FetchMode.JOIN, simpleValueTarget.getFetchMode());
valueFacade = FACADE_FACTORY.createValue(simpleValueTarget);
valueFacade.setFetchModeJoin();
Assert.assertNotEquals(FetchMode.JOIN, simpleValueTarget.getFetchMode());
Collection collectionTarget = new Bag(null, null);
Assert.assertNotEquals(FetchMode.JOIN, collectionTarget.getFetchMode());
valueFacade = FACADE_FACTORY.createValue(collectionTarget);
valueFacade.setFetchModeJoin();
Assert.assertEquals(FetchMode.JOIN, collectionTarget.getFetchMode());
ManyToOne manyToOneTarget = new ManyToOne(null, null);
Assert.assertNotEquals(FetchMode.JOIN, manyToOneTarget.getFetchMode());
valueFacade = FACADE_FACTORY.createValue(manyToOneTarget);
valueFacade.setFetchModeJoin();
Assert.assertEquals(FetchMode.JOIN, manyToOneTarget.getFetchMode());
}
Aggregations