use of org.hibernate.tool.internal.export.java.JavaExporter in project jbosstools-hibernate by jbosstools.
the class ServiceImplTest method testCreateExporter.
@Test
public void testCreateExporter() {
IExporter exporter = service.createExporter(JavaExporter.class.getName());
assertNotNull(exporter);
Object target = ((IFacade) exporter).getTarget();
assertNotNull(target);
assertTrue(target instanceof JavaExporter);
MetadataDescriptor metadataDescriptor = (MetadataDescriptor) ((JavaExporter) target).getProperties().get(ExporterConstants.METADATA_DESCRIPTOR);
// Normal metadata descriptor
assertNotNull(metadataDescriptor.getProperties());
exporter = service.createExporter(CfgExporter.class.getName());
assertNotNull(exporter);
target = ((IFacade) exporter).getTarget();
assertNotNull(target);
assertTrue(target instanceof CfgExporter);
metadataDescriptor = (MetadataDescriptor) ((CfgExporter) target).getProperties().get(ExporterConstants.METADATA_DESCRIPTOR);
// Dummy metadata descriptor
assertNull(metadataDescriptor.getProperties());
}
Aggregations