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 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());
}
Aggregations