use of org.jboss.tools.hibernate.runtime.spi.IConfiguration in project jbosstools-hibernate by jbosstools.
the class ServiceImplTest method testNewHQLCodeAssist.
@Test
public void testNewHQLCodeAssist() {
IConfiguration configuration = service.newDefaultConfiguration();
configuration.setProperty("hibernate.dialect", "org.hibernate.dialect.H2Dialect");
IHQLCodeAssist hqlCodeAssist = service.newHQLCodeAssist(configuration);
Assert.assertNotNull(hqlCodeAssist);
}
use of org.jboss.tools.hibernate.runtime.spi.IConfiguration 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.IConfiguration in project jbosstools-hibernate by jbosstools.
the class ExporterFacadeTest method testSetConfiguration.
@Test
public void testSetConfiguration() {
Configuration cfg = new Configuration();
IConfiguration configuration = new AbstractConfigurationFacade(FACADE_FACTORY, cfg) {
};
exporterFacade.setConfiguration(configuration);
Assert.assertEquals("setConfiguration", methodName);
Assert.assertArrayEquals(new Object[] { cfg }, arguments);
}
use of org.jboss.tools.hibernate.runtime.spi.IConfiguration in project jbosstools-hibernate by jbosstools.
the class FacadeFactoryTest method testCreateConfiguration.
@Test
public void testCreateConfiguration() {
Configuration configuration = new Configuration();
IConfiguration facade = facadeFactory.createConfiguration(configuration);
Assert.assertSame(configuration, ((IFacade) facade).getTarget());
Assert.assertSame(ConfigurationFacadeImpl.class, facade.getClass());
}
use of org.jboss.tools.hibernate.runtime.spi.IConfiguration in project jbosstools-hibernate by jbosstools.
the class ServiceImplTest method testNewJpaConfiguration.
@Test
public void testNewJpaConfiguration() {
IConfiguration configuration = service.newJpaConfiguration(null, "test", null);
Assert.assertNotNull(configuration);
Object target = ((IFacade) configuration).getTarget();
Assert.assertNotNull(target);
Assert.assertTrue(target instanceof Configuration);
}
Aggregations