aboutsummaryrefslogtreecommitdiff
path: root/id/server/moa-id-commons/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'id/server/moa-id-commons/src/test/java')
-rw-r--r--id/server/moa-id-commons/src/test/java/test/at/gv/egovernment/moa/AllTests.java2
-rw-r--r--id/server/moa-id-commons/src/test/java/test/at/gv/egovernment/moa/MOATestCase.java23
-rw-r--r--id/server/moa-id-commons/src/test/java/test/at/gv/egovernment/moa/util/DOMUtilsTest.java8
3 files changed, 24 insertions, 9 deletions
diff --git a/id/server/moa-id-commons/src/test/java/test/at/gv/egovernment/moa/AllTests.java b/id/server/moa-id-commons/src/test/java/test/at/gv/egovernment/moa/AllTests.java
index a3ffbec17..df4fe807f 100644
--- a/id/server/moa-id-commons/src/test/java/test/at/gv/egovernment/moa/AllTests.java
+++ b/id/server/moa-id-commons/src/test/java/test/at/gv/egovernment/moa/AllTests.java
@@ -27,7 +27,7 @@ package test.at.gv.egovernment.moa;
import junit.awtui.TestRunner;
import junit.framework.Test;
import junit.framework.TestSuite;
-
+
/**
* @author patrick
* @version $Id$
diff --git a/id/server/moa-id-commons/src/test/java/test/at/gv/egovernment/moa/MOATestCase.java b/id/server/moa-id-commons/src/test/java/test/at/gv/egovernment/moa/MOATestCase.java
index 5d1c5371a..66bf1faff 100644
--- a/id/server/moa-id-commons/src/test/java/test/at/gv/egovernment/moa/MOATestCase.java
+++ b/id/server/moa-id-commons/src/test/java/test/at/gv/egovernment/moa/MOATestCase.java
@@ -26,18 +26,19 @@ package test.at.gv.egovernment.moa;
import java.io.FileInputStream;
import java.io.StringReader;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Document;
-
import org.xml.sax.InputSource;
-import junit.framework.TestCase;
-
import at.gv.egovernment.moa.util.Constants;
import at.gv.egovernment.moa.util.DOMUtils;
+import junit.framework.TestCase;
/**
* Base class for MOA test cases.
@@ -51,6 +52,16 @@ public class MOATestCase extends TestCase {
protected static final String TESTDATA_ROOT = "data/test/";
+ protected static final Map<String, Object> parserFeatures =
+ Collections.unmodifiableMap(new HashMap<String, Object>() {
+ private static final long serialVersionUID = 1L;
+ {
+ put(DOMUtils.DISALLOW_DOCTYPE_FEATURE, true);
+
+ }
+ });
+
+
/**
* Constructor for MOATestCase.
* @param arg0
@@ -67,7 +78,8 @@ public class MOATestCase extends TestCase {
new FileInputStream(fileName),
false,
null,
- null);
+ null,
+ parserFeatures);
}
/**
@@ -80,7 +92,8 @@ public class MOATestCase extends TestCase {
new FileInputStream(fileName),
true,
Constants.ALL_SCHEMA_LOCATIONS,
- null);
+ null,
+ parserFeatures);
}
/**
diff --git a/id/server/moa-id-commons/src/test/java/test/at/gv/egovernment/moa/util/DOMUtilsTest.java b/id/server/moa-id-commons/src/test/java/test/at/gv/egovernment/moa/util/DOMUtilsTest.java
index 1a2b6904d..7b1c0cb67 100644
--- a/id/server/moa-id-commons/src/test/java/test/at/gv/egovernment/moa/util/DOMUtilsTest.java
+++ b/id/server/moa-id-commons/src/test/java/test/at/gv/egovernment/moa/util/DOMUtilsTest.java
@@ -23,6 +23,7 @@
package test.at.gv.egovernment.moa.util;
+
import java.io.FileInputStream;
import java.util.Map;
@@ -30,10 +31,9 @@ import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
-import test.at.gv.egovernment.moa.*;
-
import at.gv.egovernment.moa.util.Constants;
import at.gv.egovernment.moa.util.DOMUtils;
+import test.at.gv.egovernment.moa.MOATestCase;
/**
* @author Patrick Peck
@@ -78,7 +78,8 @@ public class DOMUtilsTest extends MOATestCase {
new FileInputStream(fileName),
true,
Constants.ALL_SCHEMA_LOCATIONS,
- null);
+ null,
+ parserFeatures);
}
public void testParseCreateXMLSignature() throws Exception {
@@ -113,6 +114,7 @@ public class DOMUtilsTest extends MOATestCase {
new FileInputStream(fileName),
false,
null,
+ null,
null);
}