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 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 testNewAnnotationConfiguration.
@Test
public void testNewAnnotationConfiguration() {
IConfiguration configuration = service.newAnnotationConfiguration();
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 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 ServiceImplTest method testNewJDBCReader.
@Test
public void testNewJDBCReader() {
IConfiguration configuration = FACADE_FACTORY.createConfiguration(new Configuration());
IReverseEngineeringStrategy engineeringStrategy = FACADE_FACTORY.createReverseEngineeringStrategy(new DefaultReverseEngineeringStrategy());
IJDBCReader jdbcReaderFacade = service.newJDBCReader(configuration, engineeringStrategy);
Assert.assertNotNull(jdbcReaderFacade);
JDBCReader reader = (JDBCReader) ((IFacade) jdbcReaderFacade).getTarget();
Assert.assertNotNull(reader);
}
Aggregations