elharo commented on code in PR #98:
URL: https://github.com/apache/xerces-j/pull/98#discussion_r3547027962
##########
tests/dom/rename/Test.java:
##########
@@ -77,138 +78,182 @@ public class Test implements UserDataHandler {
// Xerces specific feature
protected static final boolean DEFAULT_DEFERRED_DOM = true;
- //
- // Public methods
- //
+ private Document document;
- /** Performs the actual test. */
- public void test(Document doc) {
+ protected void setUp() throws Exception {
+ ParserWrapper parser = (ParserWrapper)
+ Class.forName(DEFAULT_PARSER_NAME).newInstance();
+ try {
+ parser.setFeature(NAMESPACES_FEATURE_ID, DEFAULT_NAMESPACES);
+ }
+ catch (SAXException e) {
+ // ignore
+ }
+ try {
+ parser.setFeature(VALIDATION_FEATURE_ID, DEFAULT_VALIDATION);
+ }
+ catch (SAXException e) {
+ // ignore
+ }
+ try {
+ parser.setFeature(SCHEMA_VALIDATION_FEATURE_ID,
+ DEFAULT_SCHEMA_VALIDATION);
+ }
+ catch (SAXException e) {
+ // ignore
+ }
+ try {
+ parser.setFeature(SCHEMA_FULL_CHECKING_FEATURE_ID,
+ DEFAULT_SCHEMA_FULL_CHECKING);
+ }
+ catch (SAXException e) {
+ // ignore
+ }
+ if (parser instanceof dom.wrappers.Xerces) {
+ try {
+ parser.setFeature(DEFERRED_DOM_FEATURE_ID,
+ DEFAULT_DEFERRED_DOM);
+ }
+ catch (SAXException e) {
+ // ignore
+ }
+ }
+ document = parser.parse("tests/dom/rename/input.xml");
+ }
- System.out.println("DOM rename Test...");
+ public void testRename() {
+ doTestRename(document);
+ }
+ /** Performs the actual test. */
+ public void doTestRename(Document doc) {
Review Comment:
inline this into testRename
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]