Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Bump up code coverage to 100%

  • Loading branch information...
commit a17f6bc9717717d2ac523add9d689b965032837f 1 parent b015ba7
@rolfl rolfl authored
View
15 test/src/java/org/jdom2/test/cases/input/sax/TestXMLReaderSAX2Factory.java
@@ -5,6 +5,7 @@
import java.io.IOException;
import org.junit.Test;
+import org.xml.sax.SAXException;
import org.jdom2.Document;
import org.jdom2.JDOMException;
@@ -55,6 +56,20 @@ public void testGetDriverClassName() {
facnon.getDriverClassName());
}
+ @Test
+ public void testGetDummyDriver() {
+ XMLReaderSAX2Factory facnon = new XMLReaderSAX2Factory(false,
+ "does.not.exist");
+ assertFalse(facnon.isValidating());
+ try {
+ facnon.createXMLReader();
+ UnitTestUtil.failNoException(JDOMException.class);
+ } catch (Exception e) {
+ UnitTestUtil.checkException(JDOMException.class, e);
+ UnitTestUtil.checkException(SAXException.class, e.getCause());
+ }
+ }
+
@Test
public void testParseValidateWorks() throws JDOMException, IOException {
Please sign in to comment.
Something went wrong with that request. Please try again.