use of org.jboss.tools.hibernate.runtime.spi.IReverseEngineeringStrategy in project jbosstools-hibernate by jbosstools.
the class ConfigurationFacadeTest method testSetReverseEngineeringStrategy.
@Test
public void testSetReverseEngineeringStrategy() {
JdbcMetadataConfiguration configuration = new JdbcMetadataConfiguration();
configurationFacade = FACADE_FACTORY.createConfiguration(configuration);
ReverseEngineeringStrategy reverseEngineeringStrategy = new DefaultReverseEngineeringStrategy();
IReverseEngineeringStrategy strategyFacade = FACADE_FACTORY.createReverseEngineeringStrategy(reverseEngineeringStrategy);
Assert.assertNotSame(reverseEngineeringStrategy, configuration.getReverseEngineeringStrategy());
configurationFacade.setReverseEngineeringStrategy(strategyFacade);
Assert.assertSame(reverseEngineeringStrategy, configuration.getReverseEngineeringStrategy());
}
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 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 ConfigurationFacadeTest method testSetReverseEngineeringStrategy.
@Test
public void testSetReverseEngineeringStrategy() {
JDBCMetaDataConfiguration configuration = new JDBCMetaDataConfiguration();
configurationFacade = FACADE_FACTORY.createConfiguration(configuration);
ReverseEngineeringStrategy reverseEngineeringStrategy = new DefaultReverseEngineeringStrategy();
IReverseEngineeringStrategy strategyFacade = FACADE_FACTORY.createReverseEngineeringStrategy(reverseEngineeringStrategy);
Assert.assertNotSame(reverseEngineeringStrategy, configuration.getReverseEngineeringStrategy());
configurationFacade.setReverseEngineeringStrategy(strategyFacade);
Assert.assertSame(reverseEngineeringStrategy, configuration.getReverseEngineeringStrategy());
}
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);
}
Aggregations