Search in sources :

Example 21 with AbstractExporterFacade

use of org.jboss.tools.hibernate.runtime.common.AbstractExporterFacade in project jbosstools-hibernate by jbosstools.

the class ExporterFacadeTest method setUp.

@Before
public void setUp() throws Exception {
    exporter = (Exporter) Proxy.newProxyInstance(FACADE_FACTORY.getClassLoader(), new Class[] { Exporter.class }, new TestInvocationHandler());
    exporterFacade = new AbstractExporterFacade(FACADE_FACTORY, exporter) {
    };
}
Also used : AbstractExporterFacade(org.jboss.tools.hibernate.runtime.common.AbstractExporterFacade) Before(org.junit.Before)

Example 22 with AbstractExporterFacade

use of org.jboss.tools.hibernate.runtime.common.AbstractExporterFacade in project jbosstools-hibernate by jbosstools.

the class ExporterFacadeTest method testGetHbm2DDLExporter.

@Test
public void testGetHbm2DDLExporter() {
    IHbm2DDLExporter hbm2DDLExporter = exporterFacade.getHbm2DDLExporter();
    Assert.assertNull(hbm2DDLExporter);
    exporter = new Hbm2DDLExporter();
    exporterFacade = new AbstractExporterFacade(FACADE_FACTORY, exporter) {
    };
    hbm2DDLExporter = exporterFacade.getHbm2DDLExporter();
    Assert.assertNotNull(hbm2DDLExporter);
    Assert.assertSame(exporter, ((IFacade) hbm2DDLExporter).getTarget());
}
Also used : IHbm2DDLExporter(org.jboss.tools.hibernate.runtime.spi.IHbm2DDLExporter) Hbm2DDLExporter(org.hibernate.tool.hbm2x.Hbm2DDLExporter) IHbm2DDLExporter(org.jboss.tools.hibernate.runtime.spi.IHbm2DDLExporter) AbstractExporterFacade(org.jboss.tools.hibernate.runtime.common.AbstractExporterFacade) Test(org.junit.Test)

Example 23 with AbstractExporterFacade

use of org.jboss.tools.hibernate.runtime.common.AbstractExporterFacade in project jbosstools-hibernate by jbosstools.

the class ExporterFacadeTest method testGetQueryExporter.

@Test
public void testGetQueryExporter() {
    IQueryExporter queryExporter = exporterFacade.getQueryExporter();
    Assert.assertNull(queryExporter);
    exporter = new QueryExporter();
    exporterFacade = new AbstractExporterFacade(FACADE_FACTORY, exporter) {
    };
    queryExporter = exporterFacade.getQueryExporter();
    Assert.assertNotNull(queryExporter);
    Assert.assertSame(exporter, ((IFacade) queryExporter).getTarget());
}
Also used : QueryExporter(org.hibernate.tool.hbm2x.QueryExporter) IQueryExporter(org.jboss.tools.hibernate.runtime.spi.IQueryExporter) IQueryExporter(org.jboss.tools.hibernate.runtime.spi.IQueryExporter) AbstractExporterFacade(org.jboss.tools.hibernate.runtime.common.AbstractExporterFacade) Test(org.junit.Test)

Example 24 with AbstractExporterFacade

use of org.jboss.tools.hibernate.runtime.common.AbstractExporterFacade 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 25 with AbstractExporterFacade

use of org.jboss.tools.hibernate.runtime.common.AbstractExporterFacade in project jbosstools-hibernate by jbosstools.

the class ExporterFacadeTest method testGetQueryExporter.

@Test
public void testGetQueryExporter() {
    IQueryExporter queryExporter = exporterFacade.getQueryExporter();
    Assert.assertNull(queryExporter);
    exporter = new QueryExporter();
    exporterFacade = new AbstractExporterFacade(FACADE_FACTORY, exporter) {
    };
    queryExporter = exporterFacade.getQueryExporter();
    Assert.assertNotNull(queryExporter);
    Assert.assertSame(exporter, ((IFacade) queryExporter).getTarget());
}
Also used : QueryExporter(org.hibernate.tool.hbm2x.QueryExporter) IQueryExporter(org.jboss.tools.hibernate.runtime.spi.IQueryExporter) IQueryExporter(org.jboss.tools.hibernate.runtime.spi.IQueryExporter) AbstractExporterFacade(org.jboss.tools.hibernate.runtime.common.AbstractExporterFacade) Test(org.junit.Test)

Aggregations

AbstractExporterFacade (org.jboss.tools.hibernate.runtime.common.AbstractExporterFacade)32 Test (org.junit.Test)25 GenericExporter (org.hibernate.tool.hbm2x.GenericExporter)9 Hbm2DDLExporter (org.hibernate.tool.hbm2x.Hbm2DDLExporter)9 QueryExporter (org.hibernate.tool.hbm2x.QueryExporter)9 IGenericExporter (org.jboss.tools.hibernate.runtime.spi.IGenericExporter)9 IHbm2DDLExporter (org.jboss.tools.hibernate.runtime.spi.IHbm2DDLExporter)9 IQueryExporter (org.jboss.tools.hibernate.runtime.spi.IQueryExporter)9 Before (org.junit.Before)7 File (java.io.File)1 FileWriter (java.io.FileWriter)1 AbstractExporter (org.hibernate.tool.hbm2x.AbstractExporter)1 ArtifactCollector (org.hibernate.tool.hbm2x.ArtifactCollector)1 Exporter (org.hibernate.tool.hbm2x.Exporter)1 HibernateConfigurationExporter (org.hibernate.tool.hbm2x.HibernateConfigurationExporter)1 IArtifactCollector (org.jboss.tools.hibernate.runtime.spi.IArtifactCollector)1 IExporter (org.jboss.tools.hibernate.runtime.spi.IExporter)1