use of org.jboss.tools.hibernate.runtime.spi.IPOJOClass in project jbosstools-hibernate by jbosstools.
the class HibernateMappingExporterFacadeTest method testSetExportPOJODelegate.
@Test
public void testSetExportPOJODelegate() throws Exception {
IExportPOJODelegate delegate = new IExportPOJODelegate() {
@Override
public void exportPOJO(Map<Object, Object> map, IPOJOClass pojoClass) {
}
};
Field delegateField = HibernateMappingExporterExtension.class.getDeclaredField("delegateExporter");
delegateField.setAccessible(true);
Assert.assertNull(delegateField.get(hibernateMappingExporter));
hibernateMappingExporterFacade.setExportPOJODelegate(delegate);
Assert.assertSame(delegate, delegateField.get(hibernateMappingExporter));
}
use of org.jboss.tools.hibernate.runtime.spi.IPOJOClass in project jbosstools-hibernate by jbosstools.
the class FacadeFactoryTest method testCreatePOJOClass.
@Test
public void testCreatePOJOClass() {
POJOClass pojoClass = (POJOClass) Proxy.newProxyInstance(facadeFactory.getClassLoader(), new Class[] { POJOClass.class }, new TestInvocationHandler());
IPOJOClass facade = facadeFactory.createPOJOClass(pojoClass);
Assert.assertSame(pojoClass, ((IFacade) facade).getTarget());
}
Aggregations