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);
}
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 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 ColumnFacadeTest method testGetSqlType.
@Test
public void testGetSqlType() {
Assert.assertNull(columnFacade.getSqlType());
column.setSqlType("foobar");
Assert.assertEquals("foobar", columnFacade.getSqlType());
Configuration configuration = new Configuration();
configuration.setProperty(Environment.DIALECT, "org.hibernate.dialect.H2Dialect");
MetadataImplementor metadata = (MetadataImplementor) MetadataHelper.getMetadata(configuration);
SimpleValue value = new SimpleValue(metadata);
value.setTypeName("int");
column.setValue(value);
IConfiguration configurationFacade = FACADE_FACTORY.createConfiguration(configuration);
column.setSqlType(null);
Assert.assertEquals("integer", columnFacade.getSqlType(configurationFacade));
}
use of org.jboss.tools.hibernate.runtime.spi.IConfiguration in project jbosstools-hibernate by jbosstools.
the class ColumnFacadeTest method testGetSqlType.
@Test
public void testGetSqlType() {
Assert.assertNull(columnFacade.getSqlType());
column.setSqlType("foobar");
Assert.assertEquals("foobar", columnFacade.getSqlType());
Configuration configuration = new Configuration();
configuration.setProperty(Environment.DIALECT, "org.hibernate.dialect.H2Dialect");
MetadataImplementor metadata = (MetadataImplementor) MetadataHelper.getMetadata(configuration);
SimpleValue value = new SimpleValue(metadata);
value.setTypeName("int");
column.setValue(value);
IConfiguration configurationFacade = FACADE_FACTORY.createConfiguration(configuration);
column.setSqlType(null);
Assert.assertEquals("integer", columnFacade.getSqlType(configurationFacade));
}
Aggregations