Search in sources :

Example 21 with IArtifactCollector

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

the class FacadeFactoryTest method testCreateArtifactCollector.

@Test
public void testCreateArtifactCollector() {
    ArtifactCollector artifactCollector = new ArtifactCollector();
    IArtifactCollector facade = facadeFactory.createArtifactCollector(artifactCollector);
    Assert.assertSame(artifactCollector, ((IFacade) facade).getTarget());
}
Also used : IArtifactCollector(org.jboss.tools.hibernate.runtime.spi.IArtifactCollector) ArtifactCollector(org.hibernate.tool.hbm2x.ArtifactCollector) IArtifactCollector(org.jboss.tools.hibernate.runtime.spi.IArtifactCollector) Test(org.junit.Test)

Example 22 with IArtifactCollector

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

the class ServiceImplTest method testNewArtifactCollector.

@Test
public void testNewArtifactCollector() {
    IArtifactCollector artifactCollector = service.newArtifactCollector();
    Assert.assertNotNull(artifactCollector);
    Object target = ((IFacade) artifactCollector).getTarget();
    Assert.assertNotNull(target);
    Assert.assertTrue(target instanceof ArtifactCollector);
}
Also used : IArtifactCollector(org.jboss.tools.hibernate.runtime.spi.IArtifactCollector) IArtifactCollector(org.jboss.tools.hibernate.runtime.spi.IArtifactCollector) ArtifactCollector(org.hibernate.tool.hbm2x.ArtifactCollector) IFacade(org.jboss.tools.hibernate.runtime.common.IFacade) Test(org.junit.Test)

Example 23 with IArtifactCollector

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

the class ExporterFacadeTest method testSetArtifactCollector.

@Test
public void testSetArtifactCollector() {
    ArtifactCollector ac = new ArtifactCollector();
    IArtifactCollector artifactCollector = new AbstractArtifactCollectorFacade(FACADE_FACTORY, ac) {
    };
    exporterFacade.setArtifactCollector(artifactCollector);
    Assert.assertEquals("setArtifactCollector", methodName);
    Assert.assertArrayEquals(new Object[] { ac }, arguments);
}
Also used : AbstractArtifactCollectorFacade(org.jboss.tools.hibernate.runtime.common.AbstractArtifactCollectorFacade) IArtifactCollector(org.jboss.tools.hibernate.runtime.spi.IArtifactCollector) ArtifactCollector(org.hibernate.tool.hbm2x.ArtifactCollector) IArtifactCollector(org.jboss.tools.hibernate.runtime.spi.IArtifactCollector) Test(org.junit.Test)

Example 24 with IArtifactCollector

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

the class ExporterFacadeTest method testSetArtifactCollector.

@Test
public void testSetArtifactCollector() {
    ArtifactCollector ac = new ArtifactCollector();
    IArtifactCollector artifactCollector = new AbstractArtifactCollectorFacade(FACADE_FACTORY, ac) {
    };
    exporterFacade.setArtifactCollector(artifactCollector);
    Assert.assertEquals("setArtifactCollector", methodName);
    Assert.assertArrayEquals(new Object[] { ac }, arguments);
}
Also used : AbstractArtifactCollectorFacade(org.jboss.tools.hibernate.runtime.common.AbstractArtifactCollectorFacade) IArtifactCollector(org.jboss.tools.hibernate.runtime.spi.IArtifactCollector) ArtifactCollector(org.hibernate.tool.hbm2x.ArtifactCollector) IArtifactCollector(org.jboss.tools.hibernate.runtime.spi.IArtifactCollector) Test(org.junit.Test)

Example 25 with IArtifactCollector

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

the class FacadeFactoryTest method testCreateArtifactCollector.

@Test
public void testCreateArtifactCollector() {
    ArtifactCollector artifactCollector = new ArtifactCollector();
    IArtifactCollector facade = facadeFactory.createArtifactCollector(artifactCollector);
    Assert.assertSame(artifactCollector, ((IFacade) facade).getTarget());
}
Also used : IArtifactCollector(org.jboss.tools.hibernate.runtime.spi.IArtifactCollector) ArtifactCollector(org.hibernate.tool.hbm2x.ArtifactCollector) IArtifactCollector(org.jboss.tools.hibernate.runtime.spi.IArtifactCollector) Test(org.junit.Test)

Aggregations

IArtifactCollector (org.jboss.tools.hibernate.runtime.spi.IArtifactCollector)27 ArtifactCollector (org.hibernate.tool.hbm2x.ArtifactCollector)20 Test (org.junit.Test)20 AbstractArtifactCollectorFacade (org.jboss.tools.hibernate.runtime.common.AbstractArtifactCollectorFacade)8 CoreException (org.eclipse.core.runtime.CoreException)7 IConfiguration (org.jboss.tools.hibernate.runtime.spi.IConfiguration)6 ConsoleConfiguration (org.hibernate.console.ConsoleConfiguration)5 IFacade (org.jboss.tools.hibernate.runtime.common.IFacade)4 File (java.io.File)3 Properties (java.util.Properties)3 IFile (org.eclipse.core.resources.IFile)3 NullProgressMonitor (org.eclipse.core.runtime.NullProgressMonitor)3 JavaModelException (org.eclipse.jdt.core.JavaModelException)3 HibernateConsoleRuntimeException (org.hibernate.console.HibernateConsoleRuntimeException)3 HibernateException (org.jboss.tools.hibernate.runtime.spi.HibernateException)3 IExporter (org.jboss.tools.hibernate.runtime.spi.IExporter)3 IHibernateMappingExporter (org.jboss.tools.hibernate.runtime.spi.IHibernateMappingExporter)3 IService (org.jboss.tools.hibernate.runtime.spi.IService)3 FileNotFoundException (java.io.FileNotFoundException)2 HashSet (java.util.HashSet)2