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());
}
use of org.jboss.tools.hibernate.runtime.spi.IConfiguration in project jbosstools-hibernate by jbosstools.
the class ServiceImplTest method testNewSchemaExport.
@Test
public void testNewSchemaExport() {
IConfiguration configuration = service.newDefaultConfiguration();
configuration.setProperty("hibernate.dialect", "org.hibernate.dialect.H2Dialect");
ISchemaExport schemaExport = service.newSchemaExport(configuration);
Assert.assertNotNull(schemaExport);
}
use of org.jboss.tools.hibernate.runtime.spi.IConfiguration in project jbosstools-hibernate by jbosstools.
the class ServiceImplTest method testNewHibernateMappingExporter.
@Test
public void testNewHibernateMappingExporter() {
IConfiguration configuration = service.newDefaultConfiguration();
File file = new File("");
IHibernateMappingExporter hibernateMappingExporter = service.newHibernateMappingExporter(configuration, file);
HibernateMappingExporterExtension hmee = (HibernateMappingExporterExtension) ((IFacade) hibernateMappingExporter).getTarget();
Assert.assertSame(file, hmee.getOutputDirectory());
Assert.assertSame(((ConfigurationFacadeImpl) configuration).getMetadata(), hmee.getMetadata());
}
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);
}
use of org.jboss.tools.hibernate.runtime.spi.IConfiguration in project jbosstools-hibernate by jbosstools.
the class ServiceImplTest method testNewJDBCMetaDataConfiguration.
@Test
public void testNewJDBCMetaDataConfiguration() {
IConfiguration configuration = service.newJDBCMetaDataConfiguration();
Assert.assertNotNull(configuration);
Object target = ((IFacade) configuration).getTarget();
Assert.assertNotNull(target);
Assert.assertTrue(target instanceof JdbcMetadataConfiguration);
}
Aggregations