use of org.hibernate.tool.hbm2x.HibernateConfigurationExporter in project jbosstools-hibernate by jbosstools.
the class ExporterFacadeTest method testSetCustomProperties.
@Test
public void testSetCustomProperties() {
Properties properties = new Properties();
exporterFacade.setCustomProperties(properties);
assertNotSame(properties, ((TestExporter) exporterTarget).getProperties());
exporterTarget = new HibernateConfigurationExporter();
exporterFacade = new AbstractExporterFacade(FACADE_FACTORY, exporterTarget) {
};
assertNotSame(properties, ((HibernateConfigurationExporter) exporterTarget).getCustomProperties());
exporterFacade.setCustomProperties(properties);
assertSame(properties, ((HibernateConfigurationExporter) exporterTarget).getCustomProperties());
}
use of org.hibernate.tool.hbm2x.HibernateConfigurationExporter in project jbosstools-hibernate by jbosstools.
the class ExporterFacadeTest method testSetOutput.
@Test
public void testSetOutput() {
StringWriter stringWriter = new StringWriter();
exporterFacade.setOutput(stringWriter);
assertNotSame(stringWriter, ((TestExporter) exporterTarget).writer);
exporterTarget = new HibernateConfigurationExporter();
exporterFacade = new AbstractExporterFacade(FACADE_FACTORY, exporterTarget) {
};
assertNotSame(stringWriter, ((HibernateConfigurationExporter) exporterTarget).getOutput());
exporterFacade.setOutput(stringWriter);
assertSame(stringWriter, ((HibernateConfigurationExporter) exporterTarget).getOutput());
}
Aggregations