use of org.hibernate.tool.hbm2x.AbstractExporter in project jbosstools-hibernate by jbosstools.
the class ExporterFacadeTest method testStart.
@Test
public void testStart() throws Exception {
Exporter exporter = new AbstractExporter() {
@Override
protected void doStart() {
methodName = "start";
}
};
ArtifactCollector artifactCollector = new ArtifactCollector();
File testFile = File.createTempFile("test", "xml");
FileWriter writer = new FileWriter(testFile);
writer.write("<test/>");
writer.flush();
writer.close();
artifactCollector.addFile(testFile, "xml");
exporter.setArtifactCollector(artifactCollector);
exporterFacade = new AbstractExporterFacade(FACADE_FACTORY, exporter) {
};
exporterFacade.start();
Assert.assertEquals("start", methodName);
}
use of org.hibernate.tool.hbm2x.AbstractExporter in project jbosstools-hibernate by jbosstools.
the class ExporterFacadeTest method testStart.
@Test
public void testStart() throws Exception {
Exporter exporter = new AbstractExporter() {
@Override
protected void doStart() {
methodName = "start";
}
@Override
protected Metadata buildMetadata() {
return null;
}
};
ArtifactCollector artifactCollector = new ArtifactCollector();
File testFile = File.createTempFile("test", "xml");
FileWriter writer = new FileWriter(testFile);
writer.write("<test/>");
writer.flush();
writer.close();
artifactCollector.addFile(testFile, "xml");
exporter.setArtifactCollector(artifactCollector);
exporterFacade = new ExporterFacadeImpl(FACADE_FACTORY, exporter);
exporterFacade.start();
Assert.assertEquals("start", methodName);
}
Aggregations