Skip to content

Commit

Permalink
Issue #10066 - allow test case to skip if xerces is not in use.
Browse files Browse the repository at this point in the history
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
  • Loading branch information
joakime committed Jul 5, 2023
1 parent beb858c commit 3937995
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assumptions.assumeTrue;

public class XmlParserTest
{
Expand Down Expand Up @@ -67,6 +68,8 @@ protected SAXParserFactory newSAXParserFactory()
assertNotNull(saxParser);

XMLReader xmlReader = saxParser.getXMLReader();
// Only run testcase if Xerces is being used.
assumeTrue(xmlReader.getClass().getName().contains("org.apache.xerces."));
// look to see it was set at XMLReader level
assertFalse(xmlReader.getFeature("http://apache.org/xml/features/xinclude"));
}
Expand Down

0 comments on commit 3937995

Please sign in to comment.