use of org.jboss.tools.hibernate.runtime.common.IFacade in project jbosstools-hibernate by jbosstools.
the class ServiceImplTest method testNewDefaultConfiguration.
@Test
public void testNewDefaultConfiguration() {
IConfiguration configuration = service.newDefaultConfiguration();
Assert.assertNotNull(configuration);
Object target = ((IFacade) configuration).getTarget();
Assert.assertNotNull(target);
Assert.assertTrue(target instanceof Configuration);
}
use of org.jboss.tools.hibernate.runtime.common.IFacade in project jbosstools-hibernate by jbosstools.
the class ServiceImplTest method testNewJDBCReader.
@Test
public void testNewJDBCReader() {
IConfiguration configuration = service.newDefaultConfiguration();
configuration.setProperty("hibernate.dialect", "org.hibernate.dialect.H2Dialect");
IReverseEngineeringStrategy strategy = service.newDefaultReverseEngineeringStrategy();
IJDBCReader jdbcReader = service.newJDBCReader(configuration, strategy);
Assert.assertNotNull(jdbcReader);
Object target = ((IFacade) jdbcReader).getTarget();
Assert.assertNotNull(target);
Assert.assertTrue(target instanceof JDBCReader);
}
use of org.jboss.tools.hibernate.runtime.common.IFacade in project jbosstools-hibernate by jbosstools.
the class ServiceImplTest method testNewJoinedSubclass.
@Test
public void testNewJoinedSubclass() {
IPersistentClass persistentClass = service.newRootClass();
IPersistentClass joinedSubclass = service.newJoinedSubclass(persistentClass);
Assert.assertNotNull(joinedSubclass);
Object target = ((IFacade) joinedSubclass).getTarget();
Assert.assertNotNull(target);
Assert.assertTrue(target instanceof JoinedSubclass);
Assert.assertSame(persistentClass, joinedSubclass.getSuperclass());
Assert.assertSame(((IFacade) persistentClass).getTarget(), ((JoinedSubclass) target).getSuperclass());
}
use of org.jboss.tools.hibernate.runtime.common.IFacade in project jbosstools-hibernate by jbosstools.
the class ServiceImplTest method testNewProperty.
@Test
public void testNewProperty() {
IProperty property = service.newProperty();
Assert.assertNotNull(property);
Object target = ((IFacade) property).getTarget();
Assert.assertNotNull(target);
Assert.assertTrue(target instanceof Property);
}
use of org.jboss.tools.hibernate.runtime.common.IFacade in project jbosstools-hibernate by jbosstools.
the class ServiceImplTest method testNewNamingStrategy.
@Test
public void testNewNamingStrategy() {
String strategyClassName = DefaultNamingStrategy.class.getName();
INamingStrategy namingStrategy = service.newNamingStrategy(strategyClassName);
Assert.assertNotNull(namingStrategy);
Object target = ((IFacade) namingStrategy).getTarget();
Assert.assertNotNull(target);
Assert.assertTrue(target instanceof DefaultNamingStrategy);
}
Aggregations