use of org.hibernate.cfg.reveng.DefaultReverseEngineeringStrategy in project jbosstools-hibernate by jbosstools.
the class OverrideRepositoryFacadeTest method testGetReverseEngineeringStrategy.
@Test
public void testGetReverseEngineeringStrategy() throws Exception {
ReverseEngineeringStrategy res = new DefaultReverseEngineeringStrategy();
IReverseEngineeringStrategy resFacade = FACADE_FACTORY.createReverseEngineeringStrategy(res);
IReverseEngineeringStrategy result = overrideRepositoryFacade.getReverseEngineeringStrategy(resFacade);
DelegatingReverseEngineeringStrategy resultTarget = (DelegatingReverseEngineeringStrategy) ((IFacade) result).getTarget();
Field delegateField = DelegatingReverseEngineeringStrategy.class.getDeclaredField("delegate");
delegateField.setAccessible(true);
Assert.assertSame(res, delegateField.get(resultTarget));
}
use of org.hibernate.cfg.reveng.DefaultReverseEngineeringStrategy in project jbosstools-hibernate by jbosstools.
the class ServiceImplTest method testNewDatabaseCollector.
@Test
public void testNewDatabaseCollector() {
IJDBCReader jdbcReader = FACADE_FACTORY.createJDBCReader(JDBCReaderFactory.newJDBCReader(new Configuration().getProperties(), new DefaultReverseEngineeringStrategy(), new StandardServiceRegistryBuilder().build()));
IDatabaseCollector databaseCollectorFacade = service.newDatabaseCollector(jdbcReader);
Assert.assertNotNull(databaseCollectorFacade);
DatabaseCollector databaseCollector = (DatabaseCollector) ((IFacade) databaseCollectorFacade).getTarget();
Assert.assertNotNull(databaseCollector);
}
use of org.hibernate.cfg.reveng.DefaultReverseEngineeringStrategy in project jbosstools-hibernate by jbosstools.
the class OverrideRepositoryFacadeTest method testGetReverseEngineeringStrategy.
@Test
public void testGetReverseEngineeringStrategy() throws Exception {
ReverseEngineeringStrategy res = new DefaultReverseEngineeringStrategy();
IReverseEngineeringStrategy resFacade = FACADE_FACTORY.createReverseEngineeringStrategy(res);
IReverseEngineeringStrategy result = overrideRepositoryFacade.getReverseEngineeringStrategy(resFacade);
DelegatingReverseEngineeringStrategy resultTarget = (DelegatingReverseEngineeringStrategy) ((IFacade) result).getTarget();
Field delegateField = DelegatingReverseEngineeringStrategy.class.getDeclaredField("delegate");
delegateField.setAccessible(true);
Assert.assertSame(res, delegateField.get(resultTarget));
}
use of org.hibernate.cfg.reveng.DefaultReverseEngineeringStrategy in project jbosstools-hibernate by jbosstools.
the class OverrideRepositoryFacadeTest method testGetReverseEngineeringStrategy.
@Test
public void testGetReverseEngineeringStrategy() throws Exception {
ReverseEngineeringStrategy res = new DefaultReverseEngineeringStrategy();
IReverseEngineeringStrategy resFacade = FACADE_FACTORY.createReverseEngineeringStrategy(res);
IReverseEngineeringStrategy result = overrideRepositoryFacade.getReverseEngineeringStrategy(resFacade);
DelegatingReverseEngineeringStrategy resultTarget = (DelegatingReverseEngineeringStrategy) ((IFacade) result).getTarget();
Field delegateField = DelegatingReverseEngineeringStrategy.class.getDeclaredField("delegate");
delegateField.setAccessible(true);
Assert.assertSame(res, delegateField.get(resultTarget));
}
use of org.hibernate.cfg.reveng.DefaultReverseEngineeringStrategy 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