Skip to content

Commit a17f6bc

Browse files
committed
Bump up code coverage to 100%
1 parent b015ba7 commit a17f6bc

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/src/java/org/jdom2/test/cases/input/sax/TestXMLReaderSAX2Factory.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import java.io.IOException;
66

77
import org.junit.Test;
8+
import org.xml.sax.SAXException;
89

910
import org.jdom2.Document;
1011
import org.jdom2.JDOMException;
@@ -55,6 +56,20 @@ public void testGetDriverClassName() {
5556
facnon.getDriverClassName());
5657
}
5758

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+
5873

5974
@Test
6075
public void testParseValidateWorks() throws JDOMException, IOException {

0 commit comments

Comments
 (0)