use of org.hibernate.tool.hbm2x.Exporter 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.Exporter in project jbosstools-hibernate by jbosstools.
the class FacadeFactoryTest method testCreateExporter.
@Test
public void testCreateExporter() {
Exporter exporter = (Exporter) Proxy.newProxyInstance(facadeFactory.getClassLoader(), new Class[] { Exporter.class }, new TestInvocationHandler());
IExporter facade = facadeFactory.createExporter(exporter);
assertSame(exporter, ((IFacade) facade).getTarget());
}
use of org.hibernate.tool.hbm2x.Exporter in project jbosstools-hibernate by jbosstools.
the class FacadeFactoryTest method testCreateExporter.
@Test
public void testCreateExporter() {
Exporter exporter = (Exporter) Proxy.newProxyInstance(facadeFactory.getClassLoader(), new Class[] { Exporter.class }, new TestInvocationHandler());
IExporter facade = facadeFactory.createExporter(exporter);
assertSame(exporter, ((IFacade) facade).getTarget());
}
use of org.hibernate.tool.hbm2x.Exporter in project jbosstools-hibernate by jbosstools.
the class FacadeFactoryTest method testCreateExporter.
@Test
public void testCreateExporter() {
Exporter exporter = (Exporter) Proxy.newProxyInstance(facadeFactory.getClassLoader(), new Class[] { Exporter.class }, new TestInvocationHandler());
IExporter facade = facadeFactory.createExporter(exporter);
assertSame(exporter, ((IFacade) facade).getTarget());
}
use of org.hibernate.tool.hbm2x.Exporter in project jbosstools-hibernate by jbosstools.
the class FacadeFactoryTest method testCreateExporter.
@Test
public void testCreateExporter() {
Exporter exporter = (Exporter) Proxy.newProxyInstance(facadeFactory.getClassLoader(), new Class[] { Exporter.class }, new TestInvocationHandler());
IExporter facade = facadeFactory.createExporter(exporter);
assertTrue(facade instanceof ExporterFacadeImpl);
assertSame(exporter, ((IFacade) facade).getTarget());
}
Aggregations