Search in sources :

Example 56 with EntityResolver

use of org.xml.sax.EntityResolver in project jbosstools-hibernate by jbosstools.

the class ConfigurationFacadeTest method testSetEntityResolver.

@Test
public void testSetEntityResolver() {
    EntityResolver testResolver = new DefaultHandler();
    Assert.assertNotSame(testResolver, configuration.getEntityResolver());
    configurationFacade.setEntityResolver(testResolver);
    Assert.assertSame(testResolver, configuration.getEntityResolver());
}
Also used : EntityResolver(org.xml.sax.EntityResolver) DefaultHandler(org.xml.sax.helpers.DefaultHandler) Test(org.junit.Test)

Example 57 with EntityResolver

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();
    Assert.assertNotSame(testResolver, configurationFacade.getEntityResolver());
    configuration.setEntityResolver(testResolver);
    Assert.assertSame(testResolver, configurationFacade.getEntityResolver());
}
Also used : EntityResolver(org.xml.sax.EntityResolver) DefaultHandler(org.xml.sax.helpers.DefaultHandler) Test(org.junit.Test)

Example 58 with EntityResolver

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();
    Assert.assertNotSame(testResolver, configurationFacade.getEntityResolver());
    configuration.setEntityResolver(testResolver);
    Assert.assertSame(testResolver, configurationFacade.getEntityResolver());
}
Also used : EntityResolver(org.xml.sax.EntityResolver) DefaultHandler(org.xml.sax.helpers.DefaultHandler) Test(org.junit.Test)

Example 59 with EntityResolver

use of org.xml.sax.EntityResolver in project jbosstools-hibernate by jbosstools.

the class ConfigurationFacadeTest method testSetEntityResolver.

@Test
public void testSetEntityResolver() {
    EntityResolver testResolver = new DefaultHandler();
    Assert.assertNotSame(testResolver, configuration.getEntityResolver());
    configurationFacade.setEntityResolver(testResolver);
    Assert.assertSame(testResolver, configuration.getEntityResolver());
}
Also used : EntityResolver(org.xml.sax.EntityResolver) DefaultHandler(org.xml.sax.helpers.DefaultHandler) Test(org.junit.Test)

Example 60 with EntityResolver

use of org.xml.sax.EntityResolver in project jbosstools-hibernate by jbosstools.

the class ConfigurationFacadeTest method testSetEntityResolver.

@Test
public void testSetEntityResolver() {
    EntityResolver testResolver = new DefaultHandler();
    Assert.assertNotSame(testResolver, configuration.getEntityResolver());
    configurationFacade.setEntityResolver(testResolver);
    Assert.assertSame(testResolver, configuration.getEntityResolver());
}
Also used : EntityResolver(org.xml.sax.EntityResolver) DefaultHandler(org.xml.sax.helpers.DefaultHandler) Test(org.junit.Test)

Aggregations

EntityResolver (org.xml.sax.EntityResolver)72 InputSource (org.xml.sax.InputSource)39 SAXException (org.xml.sax.SAXException)34 IOException (java.io.IOException)29 DocumentBuilder (javax.xml.parsers.DocumentBuilder)22 DocumentBuilderFactory (javax.xml.parsers.DocumentBuilderFactory)22 Document (org.w3c.dom.Document)17 DefaultHandler (org.xml.sax.helpers.DefaultHandler)17 Test (org.junit.Test)16 StringReader (java.io.StringReader)13 SAXParseException (org.xml.sax.SAXParseException)12 ByteArrayInputStream (java.io.ByteArrayInputStream)10 ParserConfigurationException (javax.xml.parsers.ParserConfigurationException)10 NodeList (org.w3c.dom.NodeList)10 InputStream (java.io.InputStream)9 ArrayList (java.util.ArrayList)8 Node (org.w3c.dom.Node)8 ErrorHandler (org.xml.sax.ErrorHandler)8 Element (org.w3c.dom.Element)7 File (java.io.File)6