use of org.jboss.tools.hibernate.runtime.spi.INamingStrategy 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;
Assert.assertNull(facade.getNamingStrategy());
facade.namingStrategy = strategy;
Assert.assertSame(strategy, facade.getNamingStrategy());
}
use of org.jboss.tools.hibernate.runtime.spi.INamingStrategy in project jbosstools-hibernate by jbosstools.
the class ConfigurationFacadeTest method testSetNamingStrategy.
@Test
public void testSetNamingStrategy() {
DefaultNamingStrategy dns = new DefaultNamingStrategy();
INamingStrategy namingStrategy = FACADE_FACTORY.createNamingStrategy(dns);
Assert.assertNotSame(dns, configuration.getNamingStrategy());
configurationFacade.setNamingStrategy(namingStrategy);
Assert.assertSame(dns, configuration.getNamingStrategy());
}
use of org.jboss.tools.hibernate.runtime.spi.INamingStrategy in project jbosstools-hibernate by jbosstools.
the class ServiceImplTest method testNewNamingStrategy.
@Test
public void testNewNamingStrategy() {
String strategyClassName = DefaultNamingStrategy.class.getName();
INamingStrategy namingStrategy = service.newNamingStrategy(strategyClassName);
Assert.assertNotNull(namingStrategy);
Object target = ((IFacade) namingStrategy).getTarget();
Assert.assertNotNull(target);
Assert.assertTrue(target instanceof DefaultNamingStrategy);
}
use of org.jboss.tools.hibernate.runtime.spi.INamingStrategy in project jbosstools-hibernate by jbosstools.
the class FacadeFactoryTest method testCreateNamingStrategy.
@Test
public void testCreateNamingStrategy() {
DefaultNamingStrategy namingStrategy = new DefaultNamingStrategy();
INamingStrategy facade = facadeFactory.createNamingStrategy(namingStrategy);
Assert.assertSame(namingStrategy, ((IFacade) facade).getTarget());
}
use of org.jboss.tools.hibernate.runtime.spi.INamingStrategy 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;
Assert.assertNull(facade.getNamingStrategy());
facade.namingStrategy = strategy;
Assert.assertSame(strategy, facade.getNamingStrategy());
}
Aggregations