Search in sources :

Example 1 with IQueryExporter

use of org.jboss.tools.hibernate.runtime.spi.IQueryExporter in project jbosstools-hibernate by jbosstools.

the class FacadeFactoryTest method testCreateQueryExporter.

@Test
public void testCreateQueryExporter() {
    QueryExporter queryExporter = new QueryExporter();
    IQueryExporter facade = facadeFactory.createQueryExporter(queryExporter);
    Assert.assertSame(queryExporter, ((IFacade) facade).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) Test(org.junit.Test)

Example 2 with IQueryExporter

use of org.jboss.tools.hibernate.runtime.spi.IQueryExporter 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 3 with IQueryExporter

use of org.jboss.tools.hibernate.runtime.spi.IQueryExporter in project jbosstools-hibernate by jbosstools.

the class ExporterFacadeTest method testGetQueryExporter.

@Test
public void testGetQueryExporter() {
    IQueryExporter queryExporter = exporterFacade.getQueryExporter();
    assertNull(queryExporter);
    exporterTarget = new QueryExporter();
    exporterFacade = new AbstractExporterFacade(FACADE_FACTORY, exporterTarget) {
    };
    queryExporter = exporterFacade.getQueryExporter();
    assertNotNull(queryExporter);
    assertSame(exporterTarget, ((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.jupiter.api.Test)

Example 4 with IQueryExporter

use of org.jboss.tools.hibernate.runtime.spi.IQueryExporter in project jbosstools-hibernate by jbosstools.

the class FacadeFactoryTest method testCreateQueryExporter.

@Test
public void testCreateQueryExporter() {
    QueryExporter queryExporter = new QueryExporter();
    IQueryExporter facade = facadeFactory.createQueryExporter(queryExporter);
    assertSame(queryExporter, ((IFacade) facade).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) Test(org.junit.jupiter.api.Test)

Example 5 with IQueryExporter

use of org.jboss.tools.hibernate.runtime.spi.IQueryExporter in project jbosstools-hibernate by jbosstools.

the class ExporterFacadeTest method testGetQueryExporter.

@Test
public void testGetQueryExporter() {
    IQueryExporter queryExporter = exporterFacade.getQueryExporter();
    assertNull(queryExporter);
    exporterTarget = new QueryExporter();
    exporterFacade = new ExporterFacadeImpl(FACADE_FACTORY, exporterTarget);
    queryExporter = exporterFacade.getQueryExporter();
    assertNotNull(queryExporter);
    assertSame(exporterTarget, ((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) Test(org.junit.jupiter.api.Test)

Aggregations

IQueryExporter (org.jboss.tools.hibernate.runtime.spi.IQueryExporter)25 QueryExporter (org.hibernate.tool.hbm2x.QueryExporter)22 Test (org.junit.jupiter.api.Test)22 AbstractExporterFacade (org.jboss.tools.hibernate.runtime.common.AbstractExporterFacade)7 QueryExporter (org.hibernate.tool.internal.export.query.QueryExporter)2 Test (org.junit.Test)2 File (java.io.File)1 ArrayList (java.util.ArrayList)1 Properties (java.util.Properties)1 StringTokenizer (java.util.StringTokenizer)1 HibernateConsoleRuntimeException (org.hibernate.console.HibernateConsoleRuntimeException)1 IExporter (org.jboss.tools.hibernate.runtime.spi.IExporter)1 IGenericExporter (org.jboss.tools.hibernate.runtime.spi.IGenericExporter)1 IHbm2DDLExporter (org.jboss.tools.hibernate.runtime.spi.IHbm2DDLExporter)1