use of org.jboss.tools.hibernate.runtime.spi.IReverseEngineeringStrategy 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.spi.IReverseEngineeringStrategy in project jbosstools-hibernate by jbosstools.
the class ServiceImplTest method testNewReverseEngineeringStrategy.
@Test
public void testNewReverseEngineeringStrategy() throws Exception {
String defaultRevEngStratClassName = "org.hibernate.cfg.reveng.DefaultReverseEngineeringStrategy";
IReverseEngineeringStrategy defaultStrategy = service.newDefaultReverseEngineeringStrategy();
IReverseEngineeringStrategy newStrategy = service.newReverseEngineeringStrategy(defaultRevEngStratClassName, defaultStrategy);
Assert.assertNotNull(newStrategy);
Object target = ((IFacade) newStrategy).getTarget();
Assert.assertNotNull(target);
Assert.assertFalse(target instanceof DelegatingReverseEngineeringStrategy);
newStrategy = service.newReverseEngineeringStrategy("org.hibernate.cfg.reveng.DelegatingReverseEngineeringStrategy", defaultStrategy);
Assert.assertNotNull(newStrategy);
target = ((IFacade) newStrategy).getTarget();
Assert.assertNotNull(target);
Assert.assertTrue(target instanceof DelegatingReverseEngineeringStrategy);
}
use of org.jboss.tools.hibernate.runtime.spi.IReverseEngineeringStrategy 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);
}
use of org.jboss.tools.hibernate.runtime.spi.IReverseEngineeringStrategy in project jbosstools-hibernate by jbosstools.
the class ServiceImplTest method testNewDefaultReverseEngineeringStrategy.
@Test
public void testNewDefaultReverseEngineeringStrategy() throws Exception {
IReverseEngineeringStrategy reverseEngineeringStrategy = service.newDefaultReverseEngineeringStrategy();
Assert.assertNotNull(reverseEngineeringStrategy);
Object target = ((IFacade) reverseEngineeringStrategy).getTarget();
Assert.assertNotNull(target);
Assert.assertTrue(target instanceof ReverseEngineeringStrategy);
}
use of org.jboss.tools.hibernate.runtime.spi.IReverseEngineeringStrategy in project jbosstools-hibernate by jbosstools.
the class ServiceImplTest method testNewReverseEngineeringStrategy.
@Test
public void testNewReverseEngineeringStrategy() throws Exception {
String defaultRevEngStratClassName = "org.hibernate.cfg.reveng.DefaultReverseEngineeringStrategy";
IReverseEngineeringStrategy defaultStrategy = service.newDefaultReverseEngineeringStrategy();
IReverseEngineeringStrategy newStrategy = service.newReverseEngineeringStrategy(defaultRevEngStratClassName, defaultStrategy);
Assert.assertNotNull(newStrategy);
Object target = ((IFacade) newStrategy).getTarget();
Assert.assertNotNull(target);
Assert.assertFalse(target instanceof DelegatingReverseEngineeringStrategy);
newStrategy = service.newReverseEngineeringStrategy("org.hibernate.cfg.reveng.DelegatingReverseEngineeringStrategy", defaultStrategy);
Assert.assertNotNull(newStrategy);
target = ((IFacade) newStrategy).getTarget();
Assert.assertNotNull(target);
Assert.assertTrue(target instanceof DelegatingReverseEngineeringStrategy);
}
Aggregations