summaryrefslogtreecommitdiff
path: root/BKUViewer/src/test/java/at/gv
diff options
context:
space:
mode:
Diffstat (limited to 'BKUViewer/src/test/java/at/gv')
-rw-r--r--BKUViewer/src/test/java/at/gv/egiz/bku/slxhtml/ValidatorTest.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/BKUViewer/src/test/java/at/gv/egiz/bku/slxhtml/ValidatorTest.java b/BKUViewer/src/test/java/at/gv/egiz/bku/slxhtml/ValidatorTest.java
index 1dd8c45f..d51b52eb 100644
--- a/BKUViewer/src/test/java/at/gv/egiz/bku/slxhtml/ValidatorTest.java
+++ b/BKUViewer/src/test/java/at/gv/egiz/bku/slxhtml/ValidatorTest.java
@@ -71,4 +71,26 @@ public class ValidatorTest {
}
+ @Test
+ public void testValidateWithDocType() throws ValidationException {
+
+ String slxhtmlFile = "at/gv/egiz/bku/slxhtml/zugang_with_DocType.xhtml";
+
+ Validator validator = ValidatorFactory.newValidator("application/xhtml+xml");
+
+ ClassLoader cl = ValidatorTest.class.getClassLoader();
+ InputStream slxhtml = cl.getResourceAsStream(slxhtmlFile);
+ long t0 = System.currentTimeMillis();
+ try {
+ validator.validate(slxhtml, null);
+
+ } catch (ValidationException e) {
+ e.printStackTrace();
+ throw e;
+ }
+ long t1 = System.currentTimeMillis();
+ log.info("Validated SLXHTML file '{}' in {}ms.", slxhtmlFile, t1 - t0);
+
+ }
+
}