use of org.jboss.tools.hibernate.runtime.common.IFacade in project jbosstools-hibernate by jbosstools.
the class ServiceImplTest method testNewColumn.
@Test
public void testNewColumn() {
IColumn column = service.newColumn("foo");
Assert.assertNotNull(column);
Object target = ((IFacade) column).getTarget();
Assert.assertNotNull(target);
Assert.assertTrue(target instanceof Column);
Assert.assertEquals("foo", ((Column) target).getName());
}
use of org.jboss.tools.hibernate.runtime.common.IFacade in project jbosstools-hibernate by jbosstools.
the class ServiceImplTest method testNewOneToOne.
@Test
public void testNewOneToOne() {
IPersistentClass persistentClass = service.newRootClass();
IValue oneToOne = service.newOneToOne(persistentClass);
Assert.assertNotNull(oneToOne);
Object target = ((IFacade) oneToOne).getTarget();
Assert.assertNotNull(target);
Assert.assertTrue(target instanceof OneToOne);
}
use of org.jboss.tools.hibernate.runtime.common.IFacade in project jbosstools-hibernate by jbosstools.
the class ServiceImplTest method testNewHQLQueryPlan.
@Test
public void testNewHQLQueryPlan() throws Exception {
IConfiguration configuration = service.newDefaultConfiguration();
File testFile = File.createTempFile("test", "tmp");
testFile.deleteOnExit();
FileWriter fileWriter = new FileWriter(testFile);
fileWriter.write(TEST_HBM_STRING);
fileWriter.close();
configuration.addFile(testFile);
ISessionFactory sfi = configuration.buildSessionFactory();
IHQLQueryPlan queryPlan = service.newHQLQueryPlan("from ServiceImplTest$Foo", true, sfi);
Assert.assertNotNull(queryPlan);
Object target = ((IFacade) queryPlan).getTarget();
Assert.assertNotNull(target);
Assert.assertTrue(target instanceof HQLQueryPlan);
}
use of org.jboss.tools.hibernate.runtime.common.IFacade in project jbosstools-hibernate by jbosstools.
the class ServiceImplTest method testNewOneToMany.
@Test
public void testNewOneToMany() {
IPersistentClass persistentClass = service.newRootClass();
IValue oneToMany = service.newOneToMany(persistentClass);
Assert.assertNotNull(oneToMany);
Object target = ((IFacade) oneToMany).getTarget();
Assert.assertNotNull(target);
Assert.assertTrue(target instanceof OneToMany);
}
use of org.jboss.tools.hibernate.runtime.common.IFacade in project jbosstools-hibernate by jbosstools.
the class ServiceImplTest method testNewReverseEngineeringSettings.
@Test
public void testNewReverseEngineeringSettings() {
IReverseEngineeringStrategy strategy = service.newDefaultReverseEngineeringStrategy();
IReverseEngineeringSettings reverseEngineeringSettings = service.newReverseEngineeringSettings(strategy);
Assert.assertNotNull(reverseEngineeringSettings);
Object target = ((IFacade) reverseEngineeringSettings).getTarget();
Assert.assertNotNull(target);
Assert.assertTrue(target instanceof ReverseEngineeringSettings);
}
Aggregations