< prev index next >

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

Print this page




  59      */
  60     @Test
  61     public void createReader02() throws SAXException {
  62         setSystemProperty("org.xml.sax.driver",
  63             "com.sun.org.apache.xerces.internal.parsers.SAXParser");
  64         assertNotNull(XMLReaderFactory.
  65             createXMLReader("com.sun.org.apache.xerces.internal.parsers.SAXParser"));
  66     }
  67 
  68     /**
  69      * SAXException expected when create XMLReader with an invalid driver name.
  70      * @throws org.xml.sax.SAXException expected Exception
  71      */
  72     @Test(expectedExceptions = SAXException.class,
  73             expectedExceptionsMessageRegExp =
  74                     "SAX2 driver class org.apache.crimson.parser.ABCD not found")
  75     public void createReader03() throws SAXException{
  76         XMLReaderFactory.createXMLReader("org.apache.crimson.parser.ABCD");
  77     }
  78 }
  79 
  80 


  59      */
  60     @Test
  61     public void createReader02() throws SAXException {
  62         setSystemProperty("org.xml.sax.driver",
  63             "com.sun.org.apache.xerces.internal.parsers.SAXParser");
  64         assertNotNull(XMLReaderFactory.
  65             createXMLReader("com.sun.org.apache.xerces.internal.parsers.SAXParser"));
  66     }
  67 
  68     /**
  69      * SAXException expected when create XMLReader with an invalid driver name.
  70      * @throws org.xml.sax.SAXException expected Exception
  71      */
  72     @Test(expectedExceptions = SAXException.class,
  73             expectedExceptionsMessageRegExp =
  74                     "SAX2 driver class org.apache.crimson.parser.ABCD not found")
  75     public void createReader03() throws SAXException{
  76         XMLReaderFactory.createXMLReader("org.apache.crimson.parser.ABCD");
  77     }
  78 }


< prev index next >