Search in sources :

Example 1 with AbstractConfigurationFacade

use of org.jboss.tools.hibernate.runtime.common.AbstractConfigurationFacade in project jbosstools-hibernate by jbosstools.

the class ExporterFacadeTest method testSetConfiguration.

@Test
public void testSetConfiguration() {
    Configuration cfg = new Configuration();
    IConfiguration configuration = new AbstractConfigurationFacade(FACADE_FACTORY, cfg) {
    };
    exporterFacade.setConfiguration(configuration);
    Assert.assertEquals("setConfiguration", methodName);
    Assert.assertArrayEquals(new Object[] { cfg }, arguments);
}
Also used : Configuration(org.hibernate.cfg.Configuration) IConfiguration(org.jboss.tools.hibernate.runtime.spi.IConfiguration) IConfiguration(org.jboss.tools.hibernate.runtime.spi.IConfiguration) AbstractConfigurationFacade(org.jboss.tools.hibernate.runtime.common.AbstractConfigurationFacade) Test(org.junit.Test)

Example 2 with AbstractConfigurationFacade

use of org.jboss.tools.hibernate.runtime.common.AbstractConfigurationFacade in project jbosstools-hibernate by jbosstools.

the class ExporterFacadeTest method testSetConfiguration.

@Test
public void testSetConfiguration() {
    Configuration cfg = new Configuration();
    IConfiguration configuration = new AbstractConfigurationFacade(FACADE_FACTORY, cfg) {
    };
    exporterFacade.setConfiguration(configuration);
    Assert.assertEquals("setConfiguration", methodName);
    Assert.assertArrayEquals(new Object[] { cfg }, arguments);
}
Also used : Configuration(org.hibernate.cfg.Configuration) IConfiguration(org.jboss.tools.hibernate.runtime.spi.IConfiguration) IConfiguration(org.jboss.tools.hibernate.runtime.spi.IConfiguration) AbstractConfigurationFacade(org.jboss.tools.hibernate.runtime.common.AbstractConfigurationFacade) Test(org.junit.Test)

Example 3 with AbstractConfigurationFacade

use of org.jboss.tools.hibernate.runtime.common.AbstractConfigurationFacade in project jbosstools-hibernate by jbosstools.

the class ExporterFacadeTest method testSetConfiguration.

@Test
public void testSetConfiguration() {
    Configuration cfg = new Configuration();
    IConfiguration configuration = new AbstractConfigurationFacade(FACADE_FACTORY, cfg) {
    };
    exporterFacade.setConfiguration(configuration);
    Assert.assertEquals("setMetadataDescriptor", methodName);
    Object argument = arguments[0];
    Assert.assertTrue(argument instanceof ConfigurationMetadataDescriptor);
    ConfigurationMetadataDescriptor metadataDescriptor = (ConfigurationMetadataDescriptor) argument;
    Assert.assertSame(configuration, metadataDescriptor.getConfiguration());
}
Also used : ConfigurationMetadataDescriptor(org.jboss.tools.hibernate.runtime.v_5_3.internal.util.ConfigurationMetadataDescriptor) Configuration(org.hibernate.cfg.Configuration) IConfiguration(org.jboss.tools.hibernate.runtime.spi.IConfiguration) IConfiguration(org.jboss.tools.hibernate.runtime.spi.IConfiguration) AbstractConfigurationFacade(org.jboss.tools.hibernate.runtime.common.AbstractConfigurationFacade) Test(org.junit.Test)

Example 4 with AbstractConfigurationFacade

use of org.jboss.tools.hibernate.runtime.common.AbstractConfigurationFacade in project jbosstools-hibernate by jbosstools.

the class ExporterFacadeTest method testSetConfiguration.

@Test
public void testSetConfiguration() {
    Configuration cfg = new Configuration();
    IConfiguration configuration = new AbstractConfigurationFacade(FACADE_FACTORY, cfg) {
    };
    exporterFacade.setConfiguration(configuration);
    Assert.assertEquals("setConfiguration", methodName);
    Assert.assertArrayEquals(new Object[] { cfg }, arguments);
}
Also used : Configuration(org.hibernate.cfg.Configuration) IConfiguration(org.jboss.tools.hibernate.runtime.spi.IConfiguration) IConfiguration(org.jboss.tools.hibernate.runtime.spi.IConfiguration) AbstractConfigurationFacade(org.jboss.tools.hibernate.runtime.common.AbstractConfigurationFacade) Test(org.junit.Test)

Example 5 with AbstractConfigurationFacade

use of org.jboss.tools.hibernate.runtime.common.AbstractConfigurationFacade in project jbosstools-hibernate by jbosstools.

the class ExporterFacadeTest method testSetConfiguration.

@Test
public void testSetConfiguration() {
    Configuration cfg = new Configuration();
    IConfiguration configuration = new AbstractConfigurationFacade(FACADE_FACTORY, cfg) {
    };
    exporterFacade.setConfiguration(configuration);
    Assert.assertEquals("setConfiguration", methodName);
    Assert.assertArrayEquals(new Object[] { cfg }, arguments);
}
Also used : Configuration(org.hibernate.cfg.Configuration) IConfiguration(org.jboss.tools.hibernate.runtime.spi.IConfiguration) IConfiguration(org.jboss.tools.hibernate.runtime.spi.IConfiguration) AbstractConfigurationFacade(org.jboss.tools.hibernate.runtime.common.AbstractConfigurationFacade) Test(org.junit.Test)

Aggregations

Configuration (org.hibernate.cfg.Configuration)8 AbstractConfigurationFacade (org.jboss.tools.hibernate.runtime.common.AbstractConfigurationFacade)8 IConfiguration (org.jboss.tools.hibernate.runtime.spi.IConfiguration)8 Test (org.junit.Test)8 ConfigurationMetadataDescriptor (org.jboss.tools.hibernate.runtime.v_5_3.internal.util.ConfigurationMetadataDescriptor)1