< prev index next >

test/javax/xml/jaxp/functional/org/xml/sax/ptests/XMLReaderFactoryTest.java

Print this page

        

*** 20,38 **** * or visit www.oracle.com if you need additional information or have any * questions. */ package org.xml.sax.ptests; import static org.testng.Assert.assertNotNull; import org.testng.annotations.Test; import org.xml.sax.SAXException; import org.xml.sax.helpers.XMLReaderFactory; /** * Unit test for XMLReaderFactory.createXMLReader API. */ ! public class XMLReaderFactoryTest { /** * No exception expected when create XMLReader by default. * @throws org.xml.sax.SAXException when xml reader creation failed. */ @Test --- 20,39 ---- * or visit www.oracle.com if you need additional information or have any * questions. */ package org.xml.sax.ptests; + import jaxp.library.JAXPBaseTest; import static org.testng.Assert.assertNotNull; import org.testng.annotations.Test; import org.xml.sax.SAXException; import org.xml.sax.helpers.XMLReaderFactory; /** * Unit test for XMLReaderFactory.createXMLReader API. */ ! public class XMLReaderFactoryTest extends JAXPBaseTest { /** * No exception expected when create XMLReader by default. * @throws org.xml.sax.SAXException when xml reader creation failed. */ @Test
*** 46,61 **** * or com.sun.org.apache.xerces.internal.parsers.SAXParser. * @throws org.xml.sax.SAXException when xml reader creation failed. */ @Test public void createReader02() throws SAXException { ! //Disable this test because this is only work for apache implementation. ! /*System.setProperty("org.xml.sax.driver", ! "org.apache.xerces.parsers.SAXParser"); ! assertNotNull(XMLReaderFactory. ! createXMLReader("org.apache.xerces.parsers.SAXParser"));*/ ! System.setProperty("org.xml.sax.driver", "com.sun.org.apache.xerces.internal.parsers.SAXParser"); assertNotNull(XMLReaderFactory. createXMLReader("com.sun.org.apache.xerces.internal.parsers.SAXParser")); } --- 47,57 ---- * or com.sun.org.apache.xerces.internal.parsers.SAXParser. * @throws org.xml.sax.SAXException when xml reader creation failed. */ @Test public void createReader02() throws SAXException { ! setSystemProperty("org.xml.sax.driver", "com.sun.org.apache.xerces.internal.parsers.SAXParser"); assertNotNull(XMLReaderFactory. createXMLReader("com.sun.org.apache.xerces.internal.parsers.SAXParser")); }
< prev index next >