use of org.jboss.tools.hibernate.runtime.v_6_0.internal.ConfigurationFacadeImpl in project jbosstools-hibernate by jbosstools.
the class ConfigurationFacadeTest method testGetClassMappings.
@Test
public void testGetClassMappings() {
configurationFacade = new ConfigurationFacadeImpl(FACADE_FACTORY, configuration);
assertFalse(configurationFacade.getClassMappings().hasNext());
PersistentClass persistentClass = new RootClass(DummyMetadataBuildingContext.INSTANCE);
persistentClass.setEntityName("Foo");
IPersistentClass persistentClassFacade = FACADE_FACTORY.createPersistentClass(persistentClass);
configurationFacade = new ConfigurationFacadeImpl(FACADE_FACTORY, configuration);
((ConfigurationFacadeImpl) configurationFacade).addedClasses.add(persistentClassFacade);
Iterator<IPersistentClass> iterator = configurationFacade.getClassMappings();
assertTrue(iterator.hasNext());
assertSame(iterator.next(), persistentClassFacade);
}
use of org.jboss.tools.hibernate.runtime.v_6_0.internal.ConfigurationFacadeImpl in project jbosstools-hibernate by jbosstools.
the class ConfigurationFacadeTest method testGetEntityResolver.
@Test
public void testGetEntityResolver() {
EntityResolver testResolver = new DefaultHandler();
ConfigurationFacadeImpl facade = (ConfigurationFacadeImpl) configurationFacade;
assertNotSame(testResolver, configurationFacade.getEntityResolver());
facade.entityResolver = testResolver;
assertSame(testResolver, configurationFacade.getEntityResolver());
}
use of org.jboss.tools.hibernate.runtime.v_6_0.internal.ConfigurationFacadeImpl in project jbosstools-hibernate by jbosstools.
the class ConfigurationFacadeTest method testSetReverseEngineeringStrategy.
@Test
public void testSetReverseEngineeringStrategy() {
JdbcMetadataConfiguration configuration = new JdbcMetadataConfiguration();
configurationFacade = new ConfigurationFacadeImpl(FACADE_FACTORY, configuration);
RevengStrategy reverseEngineeringStrategy = new DefaultStrategy();
IReverseEngineeringStrategy strategyFacade = FACADE_FACTORY.createReverseEngineeringStrategy(reverseEngineeringStrategy);
assertNotSame(reverseEngineeringStrategy, configuration.getReverseEngineeringStrategy());
configurationFacade.setReverseEngineeringStrategy(strategyFacade);
assertSame(reverseEngineeringStrategy, configuration.getReverseEngineeringStrategy());
}
use of org.jboss.tools.hibernate.runtime.v_6_0.internal.ConfigurationFacadeImpl in project jbosstools-hibernate by jbosstools.
the class ConfigurationFacadeTest method beforeEach.
@BeforeEach
public void beforeEach() {
configuration = new Configuration();
configuration.setProperty(AvailableSettings.DIALECT, MockDialect.class.getName());
configuration.setProperty(AvailableSettings.CONNECTION_PROVIDER, MockConnectionProvider.class.getName());
configurationFacade = new ConfigurationFacadeImpl(FACADE_FACTORY, configuration);
}
use of org.jboss.tools.hibernate.runtime.v_6_0.internal.ConfigurationFacadeImpl in project jbosstools-hibernate by jbosstools.
the class ConfigurationFacadeTest method testGetNamingStrategy.
@Test
public void testGetNamingStrategy() {
INamingStrategy strategy = FACADE_FACTORY.createNamingStrategy(new DefaultNamingStrategy());
ConfigurationFacadeImpl facade = (ConfigurationFacadeImpl) configurationFacade;
assertNull(facade.getNamingStrategy());
facade.namingStrategy = strategy;
assertSame(strategy, facade.getNamingStrategy());
}
Aggregations