use of org.xml.sax.EntityResolver in project jbosstools-hibernate by jbosstools.
the class ConfigurationFacadeTest method testSetEntityResolver.
@Test
public void testSetEntityResolver() throws Exception {
EntityResolver testResolver = new DefaultHandler();
ConfigurationFacadeImpl facade = (ConfigurationFacadeImpl) configurationFacade;
Field entityResolverField = ConfigurationFacadeImpl.class.getDeclaredField("entityResolver");
entityResolverField.setAccessible(true);
assertNull(entityResolverField.get(facade));
configurationFacade.setEntityResolver(testResolver);
assertSame(testResolver, entityResolverField.get(facade));
}
use of org.xml.sax.EntityResolver 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.xml.sax.EntityResolver in project jbosstools-hibernate by jbosstools.
the class ConfigurationFacadeTest method testSetEntityResolver.
@Test
public void testSetEntityResolver() throws Exception {
EntityResolver testResolver = new DefaultHandler();
ConfigurationFacadeImpl facade = (ConfigurationFacadeImpl) configurationFacade;
Field entityResolverField = ConfigurationFacadeImpl.class.getDeclaredField("entityResolver");
entityResolverField.setAccessible(true);
assertNull(entityResolverField.get(facade));
configurationFacade.setEntityResolver(testResolver);
assertSame(testResolver, entityResolverField.get(facade));
}
use of org.xml.sax.EntityResolver in project jbosstools-hibernate by jbosstools.
the class ConfigurationFacadeTest method testSetEntityResolver.
@Test
public void testSetEntityResolver() throws Exception {
EntityResolver testResolver = new DefaultHandler();
assertNotSame(testResolver, configuration.getEntityResolver());
configurationFacade.setEntityResolver(testResolver);
assertSame(testResolver, configuration.getEntityResolver());
}
use of org.xml.sax.EntityResolver in project jbosstools-hibernate by jbosstools.
the class ConfigurationFacadeTest method testGetEntityResolver.
@Test
public void testGetEntityResolver() {
EntityResolver testResolver = new DefaultHandler();
assertNotSame(testResolver, configurationFacade.getEntityResolver());
configuration.setEntityResolver(testResolver);
assertSame(testResolver, configurationFacade.getEntityResolver());
}
Aggregations