use of org.hibernate.tool.hbm2x.GenericExporter in project jbosstools-hibernate by jbosstools.
the class ExporterFacadeTest method testGetGenericExporter.
@Test
public void testGetGenericExporter() {
IGenericExporter genericExporter = exporterFacade.getGenericExporter();
Assert.assertNull(genericExporter);
exporter = new GenericExporter();
exporterFacade = new AbstractExporterFacade(FACADE_FACTORY, exporter) {
};
genericExporter = exporterFacade.getGenericExporter();
Assert.assertNotNull(genericExporter);
Assert.assertSame(exporter, ((IFacade) genericExporter).getTarget());
}
use of org.hibernate.tool.hbm2x.GenericExporter in project jbosstools-hibernate by jbosstools.
the class ExporterFacadeTest method testSetCustomProperties.
@Test
public void testSetCustomProperties() {
Exporter exporter = new GenericExporter();
exporterFacade = FACADE_FACTORY.createExporter(exporter);
Properties properties = new Properties();
exporterFacade.setCustomProperties(properties);
exporter = new HibernateConfigurationExporter();
exporterFacade = FACADE_FACTORY.createExporter(exporter);
exporterFacade.setCustomProperties(properties);
Assert.assertSame(properties, ((HibernateConfigurationExporter) exporter).getCustomProperties());
}
use of org.hibernate.tool.hbm2x.GenericExporter in project jbosstools-hibernate by jbosstools.
the class ExporterFacadeTest method testSetOutput.
@Test
public void testSetOutput() {
Exporter exporter = new GenericExporter();
exporterFacade = FACADE_FACTORY.createExporter(exporter);
StringWriter stringWriter = new StringWriter();
exporterFacade.setOutput(stringWriter);
exporter = new HibernateConfigurationExporter();
exporterFacade = FACADE_FACTORY.createExporter(exporter);
exporterFacade.setOutput(stringWriter);
Assert.assertSame(stringWriter, ((HibernateConfigurationExporter) exporter).getOutput());
}
use of org.hibernate.tool.hbm2x.GenericExporter in project jbosstools-hibernate by jbosstools.
the class ExporterFacadeTest method testSetCustomProperties.
@Test
public void testSetCustomProperties() {
Exporter exporter = new GenericExporter();
exporterFacade = FACADE_FACTORY.createExporter(exporter);
Properties properties = new Properties();
exporterFacade.setCustomProperties(properties);
exporter = new HibernateConfigurationExporter();
exporterFacade = FACADE_FACTORY.createExporter(exporter);
exporterFacade.setCustomProperties(properties);
Assert.assertSame(properties, ((HibernateConfigurationExporter) exporter).getCustomProperties());
}
use of org.hibernate.tool.hbm2x.GenericExporter in project jbosstools-hibernate by jbosstools.
the class FacadeFactoryTest method testCreateGenericExporter.
@Test
public void testCreateGenericExporter() {
GenericExporter genericExporter = new GenericExporter();
IGenericExporter facade = facadeFactory.createGenericExporter(genericExporter);
Assert.assertSame(genericExporter, ((IFacade) facade).getTarget());
}
Aggregations