use of org.hibernate.cfg.reveng.ReverseEngineeringStrategy 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.hibernate.cfg.reveng.ReverseEngineeringStrategy in project jbosstools-hibernate by jbosstools.
the class FacadeFactoryTest method testCreateReverseEngineeringStrategy.
@Test
public void testCreateReverseEngineeringStrategy() {
ReverseEngineeringStrategy res = (ReverseEngineeringStrategy) Proxy.newProxyInstance(facadeFactory.getClassLoader(), new Class[] { ReverseEngineeringStrategy.class }, new TestInvocationHandler());
IReverseEngineeringStrategy facade = facadeFactory.createReverseEngineeringStrategy(res);
Assert.assertSame(res, ((IFacade) facade).getTarget());
}
use of org.hibernate.cfg.reveng.ReverseEngineeringStrategy 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.hibernate.cfg.reveng.ReverseEngineeringStrategy 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.hibernate.cfg.reveng.ReverseEngineeringStrategy 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());
}
Aggregations