Search in sources :

Example 21 with GenericExporter

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());
}
Also used : GenericExporter(org.hibernate.tool.hbm2x.GenericExporter) IGenericExporter(org.jboss.tools.hibernate.runtime.spi.IGenericExporter) IGenericExporter(org.jboss.tools.hibernate.runtime.spi.IGenericExporter) AbstractExporterFacade(org.jboss.tools.hibernate.runtime.common.AbstractExporterFacade) Test(org.junit.Test)

Example 22 with GenericExporter

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());
}
Also used : GenericExporter(org.hibernate.tool.hbm2x.GenericExporter) IGenericExporter(org.jboss.tools.hibernate.runtime.spi.IGenericExporter) StringWriter(java.io.StringWriter) HibernateConfigurationExporter(org.hibernate.tool.hbm2x.HibernateConfigurationExporter) GenericExporter(org.hibernate.tool.hbm2x.GenericExporter) Exporter(org.hibernate.tool.hbm2x.Exporter) QueryExporter(org.hibernate.tool.hbm2x.QueryExporter) HibernateConfigurationExporter(org.hibernate.tool.hbm2x.HibernateConfigurationExporter) Hbm2DDLExporter(org.hibernate.tool.hbm2x.Hbm2DDLExporter) IQueryExporter(org.jboss.tools.hibernate.runtime.spi.IQueryExporter) IHbm2DDLExporter(org.jboss.tools.hibernate.runtime.spi.IHbm2DDLExporter) IExporter(org.jboss.tools.hibernate.runtime.spi.IExporter) IGenericExporter(org.jboss.tools.hibernate.runtime.spi.IGenericExporter) Test(org.junit.Test)

Example 23 with GenericExporter

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());
}
Also used : IGenericExporter(org.jboss.tools.hibernate.runtime.spi.IGenericExporter) GenericExporter(org.hibernate.tool.hbm2x.GenericExporter) IGenericExporter(org.jboss.tools.hibernate.runtime.spi.IGenericExporter) Test(org.junit.Test)

Example 24 with GenericExporter

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());
}
Also used : GenericExporter(org.hibernate.tool.hbm2x.GenericExporter) IGenericExporter(org.jboss.tools.hibernate.runtime.spi.IGenericExporter) StringWriter(java.io.StringWriter) HibernateConfigurationExporter(org.hibernate.tool.hbm2x.HibernateConfigurationExporter) GenericExporter(org.hibernate.tool.hbm2x.GenericExporter) Exporter(org.hibernate.tool.hbm2x.Exporter) QueryExporter(org.hibernate.tool.hbm2x.QueryExporter) HibernateConfigurationExporter(org.hibernate.tool.hbm2x.HibernateConfigurationExporter) Hbm2DDLExporter(org.hibernate.tool.hbm2x.Hbm2DDLExporter) IQueryExporter(org.jboss.tools.hibernate.runtime.spi.IQueryExporter) IHbm2DDLExporter(org.jboss.tools.hibernate.runtime.spi.IHbm2DDLExporter) IExporter(org.jboss.tools.hibernate.runtime.spi.IExporter) IGenericExporter(org.jboss.tools.hibernate.runtime.spi.IGenericExporter) Test(org.junit.Test)

Example 25 with GenericExporter

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());
}
Also used : GenericExporter(org.hibernate.tool.hbm2x.GenericExporter) IGenericExporter(org.jboss.tools.hibernate.runtime.spi.IGenericExporter) HibernateConfigurationExporter(org.hibernate.tool.hbm2x.HibernateConfigurationExporter) GenericExporter(org.hibernate.tool.hbm2x.GenericExporter) Exporter(org.hibernate.tool.hbm2x.Exporter) QueryExporter(org.hibernate.tool.hbm2x.QueryExporter) HibernateConfigurationExporter(org.hibernate.tool.hbm2x.HibernateConfigurationExporter) Hbm2DDLExporter(org.hibernate.tool.hbm2x.Hbm2DDLExporter) IQueryExporter(org.jboss.tools.hibernate.runtime.spi.IQueryExporter) IHbm2DDLExporter(org.jboss.tools.hibernate.runtime.spi.IHbm2DDLExporter) IExporter(org.jboss.tools.hibernate.runtime.spi.IExporter) IGenericExporter(org.jboss.tools.hibernate.runtime.spi.IGenericExporter) Properties(java.util.Properties) Test(org.junit.Test)

Aggregations

GenericExporter (org.hibernate.tool.hbm2x.GenericExporter)32 IGenericExporter (org.jboss.tools.hibernate.runtime.spi.IGenericExporter)32 Test (org.junit.Test)32 Exporter (org.hibernate.tool.hbm2x.Exporter)16 Hbm2DDLExporter (org.hibernate.tool.hbm2x.Hbm2DDLExporter)16 HibernateConfigurationExporter (org.hibernate.tool.hbm2x.HibernateConfigurationExporter)16 QueryExporter (org.hibernate.tool.hbm2x.QueryExporter)16 IExporter (org.jboss.tools.hibernate.runtime.spi.IExporter)16 IHbm2DDLExporter (org.jboss.tools.hibernate.runtime.spi.IHbm2DDLExporter)16 IQueryExporter (org.jboss.tools.hibernate.runtime.spi.IQueryExporter)16 StringWriter (java.io.StringWriter)8 Properties (java.util.Properties)8 AbstractExporterFacade (org.jboss.tools.hibernate.runtime.common.AbstractExporterFacade)8 AbstractExporter (org.hibernate.tool.hbm2x.AbstractExporter)4