File tree 1 file changed +15
-0
lines changed
test/src/java/org/jdom2/test/cases/input/sax
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 5
5
import java .io .IOException ;
6
6
7
7
import org .junit .Test ;
8
+ import org .xml .sax .SAXException ;
8
9
9
10
import org .jdom2 .Document ;
10
11
import org .jdom2 .JDOMException ;
@@ -55,6 +56,20 @@ public void testGetDriverClassName() {
55
56
facnon .getDriverClassName ());
56
57
}
57
58
59
+ @ Test
60
+ public void testGetDummyDriver () {
61
+ XMLReaderSAX2Factory facnon = new XMLReaderSAX2Factory (false ,
62
+ "does.not.exist" );
63
+ assertFalse (facnon .isValidating ());
64
+ try {
65
+ facnon .createXMLReader ();
66
+ UnitTestUtil .failNoException (JDOMException .class );
67
+ } catch (Exception e ) {
68
+ UnitTestUtil .checkException (JDOMException .class , e );
69
+ UnitTestUtil .checkException (SAXException .class , e .getCause ());
70
+ }
71
+ }
72
+
58
73
59
74
@ Test
60
75
public void testParseValidateWorks () throws JDOMException , IOException {
You can’t perform that action at this time.
0 commit comments