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 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 AnnotationConfiguration);
}
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 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");
SimpleValue value = new SimpleValue();
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