aboutsummaryrefslogtreecommitdiff
path: root/common/src
diff options
context:
space:
mode:
authormcentner <mcentner@d688527b-c9ab-4aba-bd8d-4036d912da1d>2007-08-08 07:25:32 +0000
committermcentner <mcentner@d688527b-c9ab-4aba-bd8d-4036d912da1d>2007-08-08 07:25:32 +0000
commit43e57a42832ea8b4ceb0317f3c9028a4174ffa7b (patch)
treef5ed9074b8d7b89b2dd5b22d326f63be103e7551 /common/src
parent10889e9dea2cc2f70b475e6ff7af37fdba1621d9 (diff)
downloadmoa-id-spss-43e57a42832ea8b4ceb0317f3c9028a4174ffa7b.tar.gz
moa-id-spss-43e57a42832ea8b4ceb0317f3c9028a4174ffa7b.tar.bz2
moa-id-spss-43e57a42832ea8b4ceb0317f3c9028a4174ffa7b.zip
Adapted project directory structure to suit the new maven based build process.
git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@909 d688527b-c9ab-4aba-bd8d-4036d912da1d
Diffstat (limited to 'common/src')
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/logging/LogMsg.java (renamed from common/src/at/gv/egovernment/moa/logging/LogMsg.java)0
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/logging/Logger.java (renamed from common/src/at/gv/egovernment/moa/logging/Logger.java)0
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/logging/LoggingContext.java (renamed from common/src/at/gv/egovernment/moa/logging/LoggingContext.java)0
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/logging/LoggingContextManager.java (renamed from common/src/at/gv/egovernment/moa/logging/LoggingContextManager.java)0
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/Base64Utils.java (renamed from common/src/at/gv/egovernment/moa/util/Base64Utils.java)0
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/BoolUtils.java (renamed from common/src/at/gv/egovernment/moa/util/BoolUtils.java)0
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/CollectionUtils.java (renamed from common/src/at/gv/egovernment/moa/util/CollectionUtils.java)0
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/Constants.java (renamed from common/src/at/gv/egovernment/moa/util/Constants.java)0
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/DOMUtils.java (renamed from common/src/at/gv/egovernment/moa/util/DOMUtils.java)0
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/DateTimeUtils.java (renamed from common/src/at/gv/egovernment/moa/util/DateTimeUtils.java)0
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/EntityResolverChain.java (renamed from common/src/at/gv/egovernment/moa/util/EntityResolverChain.java)0
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/FileUtils.java (renamed from common/src/at/gv/egovernment/moa/util/FileUtils.java)0
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/KeyStoreUtils.java (renamed from common/src/at/gv/egovernment/moa/util/KeyStoreUtils.java)0
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/MOADefaultHandler.java (renamed from common/src/at/gv/egovernment/moa/util/MOADefaultHandler.java)0
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/MOAEntityResolver.java (renamed from common/src/at/gv/egovernment/moa/util/MOAEntityResolver.java)0
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/MOAErrorHandler.java (renamed from common/src/at/gv/egovernment/moa/util/MOAErrorHandler.java)0
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/MOATimer.java (renamed from common/src/at/gv/egovernment/moa/util/MOATimer.java)0
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/MessageProvider.java (renamed from common/src/at/gv/egovernment/moa/util/MessageProvider.java)0
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/Messages.java (renamed from common/src/at/gv/egovernment/moa/util/Messages.java)0
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/NodeIteratorAdapter.java (renamed from common/src/at/gv/egovernment/moa/util/NodeIteratorAdapter.java)0
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/NodeListAdapter.java (renamed from common/src/at/gv/egovernment/moa/util/NodeListAdapter.java)0
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/OutputXML2File.java (renamed from common/src/at/gv/egovernment/moa/util/OutputXML2File.java)0
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/ResourceBundleChain.java (renamed from common/src/at/gv/egovernment/moa/util/ResourceBundleChain.java)0
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/SSLUtils.java (renamed from common/src/at/gv/egovernment/moa/util/SSLUtils.java)0
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/StreamEntityResolver.java (renamed from common/src/at/gv/egovernment/moa/util/StreamEntityResolver.java)0
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/StreamUtils.java (renamed from common/src/at/gv/egovernment/moa/util/StreamUtils.java)0
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/StringUtils.java (renamed from common/src/at/gv/egovernment/moa/util/StringUtils.java)0
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/URLDecoder.java (renamed from common/src/at/gv/egovernment/moa/util/URLDecoder.java)0
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/URLEncoder.java (renamed from common/src/at/gv/egovernment/moa/util/URLEncoder.java)0
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/XPathException.java (renamed from common/src/at/gv/egovernment/moa/util/XPathException.java)0
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/XPathUtils.java (renamed from common/src/at/gv/egovernment/moa/util/XPathUtils.java)0
-rw-r--r--common/src/test/at/gv/egovernment/moa/AllTests.java38
-rw-r--r--common/src/test/at/gv/egovernment/moa/MOATestCase.java75
-rw-r--r--common/src/test/at/gv/egovernment/moa/util/DOMUtilsTest.java137
-rw-r--r--common/src/test/at/gv/egovernment/moa/util/DateTimeUtilsTest.java104
-rw-r--r--common/src/test/at/gv/egovernment/moa/util/KeyStoreUtilsTest.java90
-rw-r--r--common/src/test/at/gv/egovernment/moa/util/SSLUtilsTest.java160
-rw-r--r--common/src/test/at/gv/egovernment/moa/util/URLDecoderTest.java29
-rw-r--r--common/src/test/at/gv/egovernment/moa/util/URLEncoderTest.java43
-rw-r--r--common/src/test/at/gv/egovernment/moa/util/XMLGrammarBuilderTest.java99
-rw-r--r--common/src/test/at/gv/egovernment/moa/util/XPathUtilsTest.java51
41 files changed, 0 insertions, 826 deletions
diff --git a/common/src/at/gv/egovernment/moa/logging/LogMsg.java b/common/src/main/java/at/gv/egovernment/moa/logging/LogMsg.java
index 4d04fc72d..4d04fc72d 100644
--- a/common/src/at/gv/egovernment/moa/logging/LogMsg.java
+++ b/common/src/main/java/at/gv/egovernment/moa/logging/LogMsg.java
diff --git a/common/src/at/gv/egovernment/moa/logging/Logger.java b/common/src/main/java/at/gv/egovernment/moa/logging/Logger.java
index eb7aa5634..eb7aa5634 100644
--- a/common/src/at/gv/egovernment/moa/logging/Logger.java
+++ b/common/src/main/java/at/gv/egovernment/moa/logging/Logger.java
diff --git a/common/src/at/gv/egovernment/moa/logging/LoggingContext.java b/common/src/main/java/at/gv/egovernment/moa/logging/LoggingContext.java
index 42d8db06e..42d8db06e 100644
--- a/common/src/at/gv/egovernment/moa/logging/LoggingContext.java
+++ b/common/src/main/java/at/gv/egovernment/moa/logging/LoggingContext.java
diff --git a/common/src/at/gv/egovernment/moa/logging/LoggingContextManager.java b/common/src/main/java/at/gv/egovernment/moa/logging/LoggingContextManager.java
index 2bbe6caa1..2bbe6caa1 100644
--- a/common/src/at/gv/egovernment/moa/logging/LoggingContextManager.java
+++ b/common/src/main/java/at/gv/egovernment/moa/logging/LoggingContextManager.java
diff --git a/common/src/at/gv/egovernment/moa/util/Base64Utils.java b/common/src/main/java/at/gv/egovernment/moa/util/Base64Utils.java
index ad29180a6..ad29180a6 100644
--- a/common/src/at/gv/egovernment/moa/util/Base64Utils.java
+++ b/common/src/main/java/at/gv/egovernment/moa/util/Base64Utils.java
diff --git a/common/src/at/gv/egovernment/moa/util/BoolUtils.java b/common/src/main/java/at/gv/egovernment/moa/util/BoolUtils.java
index fcd39b4dd..fcd39b4dd 100644
--- a/common/src/at/gv/egovernment/moa/util/BoolUtils.java
+++ b/common/src/main/java/at/gv/egovernment/moa/util/BoolUtils.java
diff --git a/common/src/at/gv/egovernment/moa/util/CollectionUtils.java b/common/src/main/java/at/gv/egovernment/moa/util/CollectionUtils.java
index 5329dcbd2..5329dcbd2 100644
--- a/common/src/at/gv/egovernment/moa/util/CollectionUtils.java
+++ b/common/src/main/java/at/gv/egovernment/moa/util/CollectionUtils.java
diff --git a/common/src/at/gv/egovernment/moa/util/Constants.java b/common/src/main/java/at/gv/egovernment/moa/util/Constants.java
index 5c1314296..5c1314296 100644
--- a/common/src/at/gv/egovernment/moa/util/Constants.java
+++ b/common/src/main/java/at/gv/egovernment/moa/util/Constants.java
diff --git a/common/src/at/gv/egovernment/moa/util/DOMUtils.java b/common/src/main/java/at/gv/egovernment/moa/util/DOMUtils.java
index 5be0bb500..5be0bb500 100644
--- a/common/src/at/gv/egovernment/moa/util/DOMUtils.java
+++ b/common/src/main/java/at/gv/egovernment/moa/util/DOMUtils.java
diff --git a/common/src/at/gv/egovernment/moa/util/DateTimeUtils.java b/common/src/main/java/at/gv/egovernment/moa/util/DateTimeUtils.java
index 58cc04c4c..58cc04c4c 100644
--- a/common/src/at/gv/egovernment/moa/util/DateTimeUtils.java
+++ b/common/src/main/java/at/gv/egovernment/moa/util/DateTimeUtils.java
diff --git a/common/src/at/gv/egovernment/moa/util/EntityResolverChain.java b/common/src/main/java/at/gv/egovernment/moa/util/EntityResolverChain.java
index e7008a701..e7008a701 100644
--- a/common/src/at/gv/egovernment/moa/util/EntityResolverChain.java
+++ b/common/src/main/java/at/gv/egovernment/moa/util/EntityResolverChain.java
diff --git a/common/src/at/gv/egovernment/moa/util/FileUtils.java b/common/src/main/java/at/gv/egovernment/moa/util/FileUtils.java
index a5e777c2d..a5e777c2d 100644
--- a/common/src/at/gv/egovernment/moa/util/FileUtils.java
+++ b/common/src/main/java/at/gv/egovernment/moa/util/FileUtils.java
diff --git a/common/src/at/gv/egovernment/moa/util/KeyStoreUtils.java b/common/src/main/java/at/gv/egovernment/moa/util/KeyStoreUtils.java
index d6a34a7b2..d6a34a7b2 100644
--- a/common/src/at/gv/egovernment/moa/util/KeyStoreUtils.java
+++ b/common/src/main/java/at/gv/egovernment/moa/util/KeyStoreUtils.java
diff --git a/common/src/at/gv/egovernment/moa/util/MOADefaultHandler.java b/common/src/main/java/at/gv/egovernment/moa/util/MOADefaultHandler.java
index 0474d92cd..0474d92cd 100644
--- a/common/src/at/gv/egovernment/moa/util/MOADefaultHandler.java
+++ b/common/src/main/java/at/gv/egovernment/moa/util/MOADefaultHandler.java
diff --git a/common/src/at/gv/egovernment/moa/util/MOAEntityResolver.java b/common/src/main/java/at/gv/egovernment/moa/util/MOAEntityResolver.java
index 9406612e2..9406612e2 100644
--- a/common/src/at/gv/egovernment/moa/util/MOAEntityResolver.java
+++ b/common/src/main/java/at/gv/egovernment/moa/util/MOAEntityResolver.java
diff --git a/common/src/at/gv/egovernment/moa/util/MOAErrorHandler.java b/common/src/main/java/at/gv/egovernment/moa/util/MOAErrorHandler.java
index 1f7757c8f..1f7757c8f 100644
--- a/common/src/at/gv/egovernment/moa/util/MOAErrorHandler.java
+++ b/common/src/main/java/at/gv/egovernment/moa/util/MOAErrorHandler.java
diff --git a/common/src/at/gv/egovernment/moa/util/MOATimer.java b/common/src/main/java/at/gv/egovernment/moa/util/MOATimer.java
index d8bf64fc3..d8bf64fc3 100644
--- a/common/src/at/gv/egovernment/moa/util/MOATimer.java
+++ b/common/src/main/java/at/gv/egovernment/moa/util/MOATimer.java
diff --git a/common/src/at/gv/egovernment/moa/util/MessageProvider.java b/common/src/main/java/at/gv/egovernment/moa/util/MessageProvider.java
index f5117e390..f5117e390 100644
--- a/common/src/at/gv/egovernment/moa/util/MessageProvider.java
+++ b/common/src/main/java/at/gv/egovernment/moa/util/MessageProvider.java
diff --git a/common/src/at/gv/egovernment/moa/util/Messages.java b/common/src/main/java/at/gv/egovernment/moa/util/Messages.java
index a0139ae93..a0139ae93 100644
--- a/common/src/at/gv/egovernment/moa/util/Messages.java
+++ b/common/src/main/java/at/gv/egovernment/moa/util/Messages.java
diff --git a/common/src/at/gv/egovernment/moa/util/NodeIteratorAdapter.java b/common/src/main/java/at/gv/egovernment/moa/util/NodeIteratorAdapter.java
index f71aa472d..f71aa472d 100644
--- a/common/src/at/gv/egovernment/moa/util/NodeIteratorAdapter.java
+++ b/common/src/main/java/at/gv/egovernment/moa/util/NodeIteratorAdapter.java
diff --git a/common/src/at/gv/egovernment/moa/util/NodeListAdapter.java b/common/src/main/java/at/gv/egovernment/moa/util/NodeListAdapter.java
index 7102cadca..7102cadca 100644
--- a/common/src/at/gv/egovernment/moa/util/NodeListAdapter.java
+++ b/common/src/main/java/at/gv/egovernment/moa/util/NodeListAdapter.java
diff --git a/common/src/at/gv/egovernment/moa/util/OutputXML2File.java b/common/src/main/java/at/gv/egovernment/moa/util/OutputXML2File.java
index f9d330d41..f9d330d41 100644
--- a/common/src/at/gv/egovernment/moa/util/OutputXML2File.java
+++ b/common/src/main/java/at/gv/egovernment/moa/util/OutputXML2File.java
diff --git a/common/src/at/gv/egovernment/moa/util/ResourceBundleChain.java b/common/src/main/java/at/gv/egovernment/moa/util/ResourceBundleChain.java
index 90b28548a..90b28548a 100644
--- a/common/src/at/gv/egovernment/moa/util/ResourceBundleChain.java
+++ b/common/src/main/java/at/gv/egovernment/moa/util/ResourceBundleChain.java
diff --git a/common/src/at/gv/egovernment/moa/util/SSLUtils.java b/common/src/main/java/at/gv/egovernment/moa/util/SSLUtils.java
index ada21b412..ada21b412 100644
--- a/common/src/at/gv/egovernment/moa/util/SSLUtils.java
+++ b/common/src/main/java/at/gv/egovernment/moa/util/SSLUtils.java
diff --git a/common/src/at/gv/egovernment/moa/util/StreamEntityResolver.java b/common/src/main/java/at/gv/egovernment/moa/util/StreamEntityResolver.java
index 38c4e863c..38c4e863c 100644
--- a/common/src/at/gv/egovernment/moa/util/StreamEntityResolver.java
+++ b/common/src/main/java/at/gv/egovernment/moa/util/StreamEntityResolver.java
diff --git a/common/src/at/gv/egovernment/moa/util/StreamUtils.java b/common/src/main/java/at/gv/egovernment/moa/util/StreamUtils.java
index a22f1c2a8..a22f1c2a8 100644
--- a/common/src/at/gv/egovernment/moa/util/StreamUtils.java
+++ b/common/src/main/java/at/gv/egovernment/moa/util/StreamUtils.java
diff --git a/common/src/at/gv/egovernment/moa/util/StringUtils.java b/common/src/main/java/at/gv/egovernment/moa/util/StringUtils.java
index 61b1a18ea..61b1a18ea 100644
--- a/common/src/at/gv/egovernment/moa/util/StringUtils.java
+++ b/common/src/main/java/at/gv/egovernment/moa/util/StringUtils.java
diff --git a/common/src/at/gv/egovernment/moa/util/URLDecoder.java b/common/src/main/java/at/gv/egovernment/moa/util/URLDecoder.java
index a20820f7e..a20820f7e 100644
--- a/common/src/at/gv/egovernment/moa/util/URLDecoder.java
+++ b/common/src/main/java/at/gv/egovernment/moa/util/URLDecoder.java
diff --git a/common/src/at/gv/egovernment/moa/util/URLEncoder.java b/common/src/main/java/at/gv/egovernment/moa/util/URLEncoder.java
index 840c0c3bc..840c0c3bc 100644
--- a/common/src/at/gv/egovernment/moa/util/URLEncoder.java
+++ b/common/src/main/java/at/gv/egovernment/moa/util/URLEncoder.java
diff --git a/common/src/at/gv/egovernment/moa/util/XPathException.java b/common/src/main/java/at/gv/egovernment/moa/util/XPathException.java
index e10c882e5..e10c882e5 100644
--- a/common/src/at/gv/egovernment/moa/util/XPathException.java
+++ b/common/src/main/java/at/gv/egovernment/moa/util/XPathException.java
diff --git a/common/src/at/gv/egovernment/moa/util/XPathUtils.java b/common/src/main/java/at/gv/egovernment/moa/util/XPathUtils.java
index 5212ed13e..5212ed13e 100644
--- a/common/src/at/gv/egovernment/moa/util/XPathUtils.java
+++ b/common/src/main/java/at/gv/egovernment/moa/util/XPathUtils.java
diff --git a/common/src/test/at/gv/egovernment/moa/AllTests.java b/common/src/test/at/gv/egovernment/moa/AllTests.java
deleted file mode 100644
index 00e2c505f..000000000
--- a/common/src/test/at/gv/egovernment/moa/AllTests.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package test.at.gv.egovernment.moa;
-
-import test.at.gv.egovernment.moa.util.DOMUtilsTest;
-import test.at.gv.egovernment.moa.util.DateTimeUtilsTest;
-import test.at.gv.egovernment.moa.util.KeyStoreUtilsTest;
-import test.at.gv.egovernment.moa.util.SSLUtilsTest;
-import test.at.gv.egovernment.moa.util.XPathUtilsTest;
-
-import junit.awtui.TestRunner;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-/**
- * @author patrick
- * @version $Id$
- */
-public class AllTests {
-
- public static Test suite() {
- TestSuite suite = new TestSuite();
-
- suite.addTestSuite(DOMUtilsTest.class);
- suite.addTestSuite(DateTimeUtilsTest.class);
- suite.addTestSuite(XPathUtilsTest.class);
- suite.addTestSuite(KeyStoreUtilsTest.class);
- suite.addTestSuite(SSLUtilsTest.class);
-
- return suite;
- }
-
- public static void main(String[] args) {
- try {
- TestRunner.run(AllTests.class);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-}
diff --git a/common/src/test/at/gv/egovernment/moa/MOATestCase.java b/common/src/test/at/gv/egovernment/moa/MOATestCase.java
deleted file mode 100644
index 86ea2ee6c..000000000
--- a/common/src/test/at/gv/egovernment/moa/MOATestCase.java
+++ /dev/null
@@ -1,75 +0,0 @@
-package test.at.gv.egovernment.moa;
-
-import java.io.FileInputStream;
-import java.io.StringReader;
-
-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;
-
-/**
- * Base class for MOA test cases.
- *
- * Provides some utility functions.
- *
- * @author Patrick Peck
- * @version $Id$
- */
-public class MOATestCase extends TestCase {
-
- protected static final String TESTDATA_ROOT = "data/test/";
-
- /**
- * Constructor for MOATestCase.
- * @param arg0
- */
- public MOATestCase(String name) {
- super(name);
- }
-
- /**
- * Parse an XML file non-validating.
- */
- public static Document parseXml(String fileName) throws Exception {
- return DOMUtils.parseDocument(
- new FileInputStream(fileName),
- false,
- null,
- null);
- }
-
- /**
- * Parse an XML validating with a given file name.
- *
- * Uses the local schema resources.
- */
- public static Document parseXmlValidating(String fileName) throws Exception {
- return DOMUtils.parseDocument(
- new FileInputStream(fileName),
- true,
- Constants.ALL_SCHEMA_LOCATIONS,
- null);
- }
-
- /**
- * Parse an XML from a String.
- */
- public static Document parseXmlString(String xml) throws Exception {
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- DocumentBuilder builder;
-
- factory.setNamespaceAware(true);
- builder = factory.newDocumentBuilder();
-
- return builder.parse(new InputSource(new StringReader(xml)));
- }
-
-}
diff --git a/common/src/test/at/gv/egovernment/moa/util/DOMUtilsTest.java b/common/src/test/at/gv/egovernment/moa/util/DOMUtilsTest.java
deleted file mode 100644
index eb3ad1a5c..000000000
--- a/common/src/test/at/gv/egovernment/moa/util/DOMUtilsTest.java
+++ /dev/null
@@ -1,137 +0,0 @@
-package test.at.gv.egovernment.moa.util;
-import java.io.FileInputStream;
-import java.util.Map;
-
-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;
-
-/**
- * @author Patrick Peck
- * @version $Id$
- */
-public class DOMUtilsTest extends MOATestCase {
- private static final String TESTDATA_BASE = TESTDATA_ROOT + "xml/";
- private static boolean grammarsInitialized = false;
-
- /**
- * Constructor for DOMUtilsTest.
- * @param name
- */
- public DOMUtilsTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- if (!grammarsInitialized) {
- // preparse XML schema
- DOMUtils.addSchemaToPool(
- getClass().getResourceAsStream(Constants.XML_SCHEMA_LOCATION),
- Constants.XML_NS_URI);
- // preparse XMLDsig Filter2 schema
- DOMUtils.addSchemaToPool(
- getClass().getResourceAsStream(Constants.DSIG_FILTER2_SCHEMA_LOCATION),
- Constants.DSIG_FILTER2_NS_URI);
- // preparse XMLDsig schema
- DOMUtils.addSchemaToPool(
- getClass().getResourceAsStream(Constants.DSIG_SCHEMA_LOCATION),
- Constants.DSIG_NS_URI);
- // preparse MOA schema
- DOMUtils.addSchemaToPool(
- getClass().getResourceAsStream(Constants.MOA_SCHEMA_LOCATION),
- Constants.MOA_NS_URI);
- grammarsInitialized = true;
- }
- }
-
- private Document parse(String fileName) throws Exception {
- return DOMUtils.parseDocument(
- new FileInputStream(fileName),
- true,
- Constants.ALL_SCHEMA_LOCATIONS,
- null);
- }
-
- public void testParseCreateXMLSignature() throws Exception {
- parse(TESTDATA_BASE + "CreateXMLSignature/TestGeneratorCX2.005.Req.xml");
- parse(TESTDATA_BASE + "CreateXMLSignature/Req000.xml");
- parse(TESTDATA_BASE + "CreateXMLSignature/Req001.xml");
- parse(TESTDATA_BASE + "CreateXMLSignature/Req002.xml");
- parse(TESTDATA_BASE + "CreateXMLSignature/Req004.xml");
- }
-
- public void testParseVerifyCMSSignature() throws Exception {
- parse(TESTDATA_BASE + "VerifyCMSSignature/Req000.xml");
- }
-
- public void testParseVerifyXMLSignature() throws Exception {
- parse(TESTDATA_BASE + "VerifyXMLSignature/Req000.xml");
- parse(TESTDATA_BASE + "VerifyXMLSignature/Req001.xml");
- parse(TESTDATA_BASE + "VerifyXMLSignature/Req002.xml");
- parse(TESTDATA_BASE + "VerifyXMLSignature/TestGeneratorVX.002.Req.xml");
- //parse(TESTDATA_BASE + "VerifyXMLSignature/TestGeneratorVX.006.Req.xml");
- parse(TESTDATA_BASE + "VerifyXMLSignature/VerifySAMLRequest.xml");
- }
-
- public void testParseInfobox() throws Exception {
- parse(TESTDATA_BASE + "Infobox/InfoboxReadResponseMOA4.xml");
- parse(TESTDATA_BASE + "Infobox/InfoboxReadResponse.xml");
- }
-
-
- private Document parsePlain(String fileName) throws Exception {
- return DOMUtils.parseDocument(
- new FileInputStream(fileName),
- false,
- null,
- null);
- }
-
- public void testValidateCreateXMLSignature() throws Exception {
- Document doc;
- boolean valid;
-
- // test a valid request
- doc = parsePlain(TESTDATA_BASE + "CreateXMLSignature/Req000.xml");
- valid =
- DOMUtils.validateElement(
- doc.getDocumentElement(),
- Constants.ALL_SCHEMA_LOCATIONS,
- null);
- assertTrue(valid);
-
- // test an invalid request
- doc = parsePlain(TESTDATA_BASE + "CreateXMLSignature/invalid.xml");
- try {
- valid =
- DOMUtils.validateElement(
- doc.getDocumentElement(),
- Constants.ALL_SCHEMA_LOCATIONS,
- null);
- fail();
- } catch (Exception e) {
- }
- }
-
- public void testGetNamespaceDeclarations() throws Exception {
- Document doc;
- NodeList nl;
- Element elem;
- Map nsDecls;
-
- doc = parse(TESTDATA_BASE + "VerifyXMLSignature/Req002.xml");
- nl = doc.getElementsByTagNameNS(Constants.DSIG_NS_URI, "Reference");
- elem = (Element) nl.item(0);
- nsDecls = DOMUtils.getNamespaceDeclarations(elem);
-
- assertEquals(2, nsDecls.size());
- assertEquals(Constants.DSIG_NS_URI, nsDecls.get("dsig"));
- assertEquals(Constants.MOA_NS_URI, nsDecls.get(""));
- }
-
-}
diff --git a/common/src/test/at/gv/egovernment/moa/util/DateTimeUtilsTest.java b/common/src/test/at/gv/egovernment/moa/util/DateTimeUtilsTest.java
deleted file mode 100644
index da6b29b1c..000000000
--- a/common/src/test/at/gv/egovernment/moa/util/DateTimeUtilsTest.java
+++ /dev/null
@@ -1,104 +0,0 @@
-package test.at.gv.egovernment.moa.util;
-import java.text.DateFormat;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.GregorianCalendar;
-import java.util.TimeZone;
-
-import junit.framework.TestCase;
-
-import at.gv.egovernment.moa.util.DateTimeUtils;
-
-/**
- * @author Patrick Peck
- * @version $Id$
- */
-public class DateTimeUtilsTest extends TestCase {
-
- /**
- * Constructor for DateTimeUtilsTest.
- * @param arg0
- */
- public DateTimeUtilsTest(String arg0) {
- super(arg0);
- }
-
- public void testParseDateTimeValid() throws Exception {
- Date date;
- DateFormat format = SimpleDateFormat.getDateTimeInstance();
- String dateStr;
-
- format.setTimeZone(TimeZone.getTimeZone("GMT"));
- date = DateTimeUtils.parseDateTime("+1971-12-12T06:30:15");
- date.setTime(date.getTime() + TimeZone.getDefault().getRawOffset());
- dateStr = format.format(date);
- assertEquals("12.12.1971 06:30:15", dateStr);
-
- date = DateTimeUtils.parseDateTime("2000-01-01T23:59:59.012Z");
- dateStr = format.format(date);
- assertEquals("01.01.2000 23:59:59", dateStr);
-
- date = DateTimeUtils.parseDateTime("2003-05-20T12:17:30-05:00");
- dateStr = format.format(date);
- assertEquals("20.05.2003 17:17:30", dateStr);
-
-
- date = DateTimeUtils.parseDateTime("2002-02-02T02:02:02.33+04:30");
- dateStr = format.format(date);
- assertEquals("01.02.2002 21:32:02", dateStr);
- }
-
- public void testParseDateTimeInvalid() {
- try {
- DateTimeUtils.parseDateTime("+1971-12-12T6:30:15");
- fail();
- } catch (ParseException e) {
- }
-
- try {
- DateTimeUtils.parseDateTime("2000-01-0123:59:59.999999Z");
- fail();
- } catch (ParseException e) {
- }
-
- try {
- DateTimeUtils.parseDateTime("2003-05-20T12:17:3005:00");
- fail();
- } catch (ParseException e) {
- }
-
- try {
- DateTimeUtils.parseDateTime(" 2002-02-02T02:02:02.33+04:00");
- fail();
- } catch (ParseException e) {
- }
-
- }
-
- public void testBuildDateTimeGMTMinus3() {
- String should = "2002-01-01T01:01:01-03:00";
- doTestBuildDateTime(2002, 1, 1, 1, 1, 1, "GMT-03:00", should);
- }
- public void testBuildDateTimeMEZSommerzeit() {
- String should = "2002-07-31T23:59:59+02:00";
- doTestBuildDateTime(2002, 7, 31, 23, 59, 59, "GMT+01:00", should);
- }
- public void testBuildDateTimeGMT() {
- String should = "2002-01-01T01:01:01";
- doTestBuildDateTime(2002, 1, 1, 1, 1, 1, "GMT+00:00", should);
- }
- private void doTestBuildDateTime(
- int year, int month, int day,
- int hour, int min, int sec,
- String timeZone, String dateTimeShould) {
-
- Calendar cal = new GregorianCalendar(TimeZone.getTimeZone(timeZone));
- cal.set(year,month, day, hour, min, sec);
- cal.set(Calendar.MILLISECOND, 0);
- String dateTimeBuilt = DateTimeUtils.buildDateTime(cal);
- assertEquals(dateTimeShould, dateTimeBuilt);
- }
-
-}
diff --git a/common/src/test/at/gv/egovernment/moa/util/KeyStoreUtilsTest.java b/common/src/test/at/gv/egovernment/moa/util/KeyStoreUtilsTest.java
deleted file mode 100644
index a6d1847ce..000000000
--- a/common/src/test/at/gv/egovernment/moa/util/KeyStoreUtilsTest.java
+++ /dev/null
@@ -1,90 +0,0 @@
-package test.at.gv.egovernment.moa.util;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.math.BigInteger;
-import java.security.KeyStore;
-import java.security.Security;
-import java.security.cert.X509Certificate;
-import java.util.Enumeration;
-
-import at.gv.egovernment.moa.util.KeyStoreUtils;
-
-import junit.framework.TestCase;
-
-/**
- * @author Paul Ivancsics
- * @version $Id$
- */
-public class KeyStoreUtilsTest extends TestCase {
- private String tmpDir = "tmp/KeyStoreUtilsTest";
- private String tmpDirURL = "file:" + tmpDir;
-
- public KeyStoreUtilsTest(String arg0) {
- super(arg0);
- }
-
- protected void setUp() throws Exception {
- Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
- new File(tmpDir).mkdirs();
- }
- protected void tearDown() throws Exception {
- new File(tmpDir).delete();
- }
- public void testCreateKeyStoreJKS() throws Exception {
- String[] certFilenames = new String[] {
- "data/test/security/server-certs/baltimore.cer"
- };
- KeyStore ks = KeyStoreUtils.createKeyStore("jks", certFilenames);
- assertEquals(1, ks.size());
- X509Certificate cert = (X509Certificate)ks.getCertificate("0");
- assertEquals(3424, cert.getSerialNumber().intValue());
- }
- public void testCreateKeyStorePKCS12() throws Exception {
- String[] certFilenames = new String[] {
- "data/test/security/server-certs/baltimore.cer"
- };
- KeyStore ks = KeyStoreUtils.createKeyStore("pkcs12", certFilenames);
- assertEquals(1, ks.size());
- X509Certificate cert = (X509Certificate)ks.getCertificate("0");
- assertEquals(3424, cert.getSerialNumber().intValue());
- }
- public void testCreateKeyStoreFromCertificateDirectory() throws Exception {
- // copy certificate files to a temporary directory,
- // omitting the "CVS" directory in the source directory
- copyCertificates("data/test/security/server-certs", tmpDir);
- KeyStore ks = KeyStoreUtils.createKeyStoreFromCertificateDirectory("jks", tmpDirURL);
- assertEquals(2, ks.size());
- X509Certificate cert0 = (X509Certificate)ks.getCertificate("0");
- X509Certificate cert1 = (X509Certificate)ks.getCertificate("1");
- assertTrue(3424 == cert0.getSerialNumber().intValue() || 3424 == cert1.getSerialNumber().intValue());
- }
- private void copyCertificates(String from, String to) throws IOException {
- String[] fromList = new File(from).list();
- for (int i = 0; i < fromList.length; i++) {
- File fromFile = new File(from + File.separator + fromList[i]);
- if (fromFile.isFile()) {
- String toFile = to + "/" + fromList[i];
- FileInputStream in = new FileInputStream(fromFile);
- FileOutputStream out = new FileOutputStream(toFile);
- for (int ch = in.read(); ch >= 0; ch = in.read())
- out.write(ch);
- out.close();
- in.close();
- }
- }
-
- }
- public void testLoadKeyStore() throws Exception {
- String keyStoreURL = "file:data/test/security/client-certs/sicher-demo(buergerkarte).p12";
- KeyStore ks = KeyStoreUtils.loadKeyStore("pkcs12", keyStoreURL, "buergerkarte");
- assertEquals(1, ks.size());
- Enumeration aliases = ks.aliases();
- String alias = (String)aliases.nextElement();
- X509Certificate cert = (X509Certificate)ks.getCertificate(alias);
- assertEquals(new BigInteger("1044289238331").intValue(), cert.getSerialNumber().intValue());
- }
-
-}
diff --git a/common/src/test/at/gv/egovernment/moa/util/SSLUtilsTest.java b/common/src/test/at/gv/egovernment/moa/util/SSLUtilsTest.java
deleted file mode 100644
index 7e55cb7d0..000000000
--- a/common/src/test/at/gv/egovernment/moa/util/SSLUtilsTest.java
+++ /dev/null
@@ -1,160 +0,0 @@
-package test.at.gv.egovernment.moa.util;
-
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.net.URL;
-import java.security.KeyStore;
-import java.security.Security;
-
-import javax.net.ssl.SSLException;
-import javax.net.ssl.SSLSocketFactory;
-
-import com.sun.net.ssl.HostnameVerifier;
-import com.sun.net.ssl.HttpsURLConnection;
-
-import at.gv.egovernment.moa.util.KeyStoreUtils;
-import at.gv.egovernment.moa.util.SSLUtils;
-
-import junit.framework.TestCase;
-
-/**
- * @author Paul Ivancsics
- * @version $Id$
- */
-public class SSLUtilsTest extends TestCase {
-
- public SSLUtilsTest(String arg0) {
- super(arg0);
- }
-
-
- protected void setUp() throws Exception {
- //System.setProperty("javax.net.debug", "all");
- Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
- System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
- System.setProperty("https.cipherSuites", "SSL_DHE_DSS_WITH_DES_CBC_SHA,SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA,SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA,SSL_RSA_WITH_DES_CBC_SHA,SSL_RSA_WITH_3DES_EDE_CBC_SHA,SSL_RSA_EXPORT_WITH_RC4_40_MD5");
- }
-
- public void testGetSSLSocketFactoryBaltimoreOK() throws Exception {
- doTestGetSSLSocketFactory(
- "GET",
- "https://www.baltimore.com/",
- false,
- "file:data/test/security/cacerts+gt_cybertrust_root",
- "changeit",
- true);
- }
- public void testGetSSLSocketFactoryBaltimoreNOK() throws Exception {
- doTestGetSSLSocketFactory(
- "GET",
- "https://www.baltimore.com/",
- false,
- "file:data/test/security/cacerts",
- "changeit",
- false);
- }
- public void testGetSSLSocketFactoryVerisignOK() throws Exception {
- doTestGetSSLSocketFactory(
- "GET",
- "https://www.verisign.com/",
- false,
- "file:data/test/security/cacerts",
- "changeit",
- true);
- }
- public void testGetSSLSocketFactoryVerisignNoTruststoreOK() throws Exception {
- doTestGetSSLSocketFactory(
- "GET",
- "https://www.verisign.com/",
- false,
- null,
- null,
- true);
- }
- public void testGetSSLSocketFactoryLocalhostOK() throws Exception {
- String urlString = "https://localhost:8443/moa-id-auth/index.jsp";
- doTestGetSSLSocketFactory(
- "GET",
- urlString,
- true,
- "file:data/test/security/server.keystore.tomcat",
- "changeit",
- true);
- }
- public void testGetSSLSocketFactoryLocalhostNOK() throws Exception {
- String urlString = "https://localhost:8443/moa-id-auth/index.jsp";
- doTestGetSSLSocketFactory(
- "GET",
- urlString,
- true,
- null,
- null,
- false);
- }
-
- public void doTestGetSSLSocketFactory(
- String requestMethod,
- String urlString,
- boolean useHostnameVerifierHack,
- String truststoreurl,
- String trustpassword,
- boolean shouldOk
- ) throws Exception {
-
- doTestGetSSLSocketFactory(
- requestMethod, urlString, useHostnameVerifierHack, truststoreurl, trustpassword, null, null, null, shouldOk);
- }
- public void doTestGetSSLSocketFactory(
- String requestMethod,
- String urlString,
- boolean useHostnameVerifierHack,
- String truststoreurl,
- String trustpassword,
- String keystoretype,
- String keystoreurl,
- String keypassword,
- boolean shouldOk
- ) throws Exception {
-
- KeyStore truststore = null;
- if (truststoreurl != null)
- truststore = KeyStoreUtils.loadKeyStore("jks", truststoreurl, trustpassword);
- SSLSocketFactory sf = SSLUtils.getSSLSocketFactory(
- truststore, keystoretype, keystoreurl, keypassword);
- System.out.println(requestMethod + " " + urlString);
-
- URL url = new URL(urlString);
- HttpsURLConnection conn = (HttpsURLConnection)url.openConnection();
- conn.setRequestMethod(requestMethod);
- conn.setDoInput(true);
- conn.setDoOutput(true);
- conn.setUseCaches(false);
- conn.setAllowUserInteraction(false);
- conn.setSSLSocketFactory(sf);
- if (useHostnameVerifierHack)
- conn.setHostnameVerifier(new HostnameVerifierHack());
- try {
- conn.connect();
- assertTrue(shouldOk);
- assertEquals(200, conn.getResponseCode());
- conn.disconnect();
- }
- catch (SSLException ex) {
- assertFalse(shouldOk);
- }
- }
- private byte[] readTruststore(String filename) throws IOException {
- if (filename == null)
- return null;
- FileInputStream in = new FileInputStream(filename);
- byte[] buffer = new byte[in.available()];
- in.read(buffer);
- in.close();
- return buffer;
- }
- private class HostnameVerifierHack implements HostnameVerifier {
- public boolean verify(String arg0, String arg1) {
- return true;
- }
- }
-}
diff --git a/common/src/test/at/gv/egovernment/moa/util/URLDecoderTest.java b/common/src/test/at/gv/egovernment/moa/util/URLDecoderTest.java
deleted file mode 100644
index b6ea0e152..000000000
--- a/common/src/test/at/gv/egovernment/moa/util/URLDecoderTest.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package test.at.gv.egovernment.moa.util;
-
-import java.net.URLEncoder;
-
-import at.gv.egovernment.moa.util.FileUtils;
-import at.gv.egovernment.moa.util.URLDecoder;
-
-import junit.framework.TestCase;
-
-/*
- * @author Paul Ivancsics
- * @version $Id$
- */
-public class URLDecoderTest extends TestCase {
-
- public void test() throws Exception {
- String s = "immerZUA0129<>%==$$%&/()@?{()=} \\\"äöüÄÖÜ?§";
- String senc = URLEncoder.encode(s);
- String sdec = URLDecoder.decode(senc, "ISO-8859-1");
- assertEquals(s, sdec);
- }
- public void testUTF8() throws Exception {
- String s = new String(FileUtils.readFile("data/test/xml/CreateXMLSignature/CreateXMLSignatureResponse.xml"));
- String senc = URLEncoder.encode(s);
- String sdec = URLDecoder.decode(senc, "UTF-8");
- String sutf8 = FileUtils.readFile("data/test/xml/CreateXMLSignature/CreateXMLSignatureResponse.xml", "UTF-8");
- assertEquals(sutf8, sdec);
- }
-}
diff --git a/common/src/test/at/gv/egovernment/moa/util/URLEncoderTest.java b/common/src/test/at/gv/egovernment/moa/util/URLEncoderTest.java
deleted file mode 100644
index 43238c51f..000000000
--- a/common/src/test/at/gv/egovernment/moa/util/URLEncoderTest.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package test.at.gv.egovernment.moa.util;
-
-import at.gv.egovernment.moa.util.FileUtils;
-import at.gv.egovernment.moa.util.URLDecoder;
-import at.gv.egovernment.moa.util.URLEncoder;
-import junit.framework.TestCase;
-
-/*
- * @author Paul Ivancsics
- * @version $Id$
- */
-public class URLEncoderTest extends TestCase {
-
- public void testUnchangedString() throws Exception {
- String s = "AZaz0123456789.-*_";
- String senc = URLEncoder.encode(s, "UTF-8");
- assertEquals(s, senc);
- }
- public void testAumlUTF8() throws Exception {
- String s = "ä";
- String senc = URLEncoder.encode(s, "UTF-8");
- assertEquals("%C3%A4", senc);
- }
- public void testEncodeDecode() throws Exception {
- String s = "AZaz09.-*_ <>%=$%&/()@?{}[]\\\"'äöüÄÖÜߧ";
- String senc = URLEncoder.encode(s, "UTF-8");
- String sdec = URLDecoder.decode(senc, "UTF-8");
- assertEquals(s, sdec);
- }
- public void testCertInfo() throws Exception {
- String s = new String(FileUtils.readFile("data/test/xml/VerifyXMLSignature/CertInfoVerifyXMLSignatureRequest.xml", "UTF-8"));
- String senc = URLEncoder.encode(s, "UTF-8");
- String sdec = URLDecoder.decode(senc, "UTF-8");
- assertEquals(s, sdec);
- }
- /*public void testJDK14() throws Exception {
- String s = new String(FileUtils.readFile("data/test/xml/VerifyXMLSignature/CertInfoVerifyXMLSignatureRequest.xml", "UTF-8"));
- String senc = URLEncoder.encode(s, "UTF-8");
- String senc14 = java.net.URLEncoder.encode(s, "UTF-8");
- assertEquals(senc, senc14);
- }*/
-
-}
diff --git a/common/src/test/at/gv/egovernment/moa/util/XMLGrammarBuilderTest.java b/common/src/test/at/gv/egovernment/moa/util/XMLGrammarBuilderTest.java
deleted file mode 100644
index 7986fe540..000000000
--- a/common/src/test/at/gv/egovernment/moa/util/XMLGrammarBuilderTest.java
+++ /dev/null
@@ -1,99 +0,0 @@
-package test.at.gv.egovernment.moa.util;
-import java.io.FileInputStream;
-import java.io.InputStream;
-
-import org.apache.xerces.parsers.DOMParser;
-import org.apache.xerces.parsers.XMLGrammarPreparser;
-import org.apache.xerces.util.SymbolTable;
-import org.apache.xerces.util.XMLGrammarPoolImpl;
-import org.apache.xerces.xni.grammars.Grammar;
-import org.apache.xerces.xni.grammars.XMLGrammarDescription;
-import org.apache.xerces.xni.parser.XMLInputSource;
-import org.xml.sax.InputSource;
-
-import test.at.gv.egovernment.moa.MOATestCase;
-
-import at.gv.egovernment.moa.util.Constants;
-
-
-/**
- * Experimentation with Xerces grammar caching.
- *
- * Used the Xerces sample 'XMLGrammarBuilder' as a starting point.
- *
- * @author Patrick Peck
- * @version $Id$
- */
-public class XMLGrammarBuilderTest extends MOATestCase {
-
- private static final String GRAMMAR_POOL =
- org.apache.xerces.impl.Constants.XERCES_PROPERTY_PREFIX
- + org.apache.xerces.impl.Constants.XMLGRAMMAR_POOL_PROPERTY;
-
- protected static final String NAMESPACES_FEATURE_ID =
- "http://xml.org/sax/features/namespaces";
- protected static final String VALIDATION_FEATURE_ID =
- "http://xml.org/sax/features/validation";
- protected static final String SCHEMA_VALIDATION_FEATURE_ID =
- "http://apache.org/xml/features/validation/schema";
- protected static final String SCHEMA_FULL_CHECKING_FEATURE_ID =
- "http://apache.org/xml/features/validation/schema-full-checking";
-
- private static final int BIG_PRIME = 2039;
- private SymbolTable symbolTable;
- private XMLGrammarPoolImpl grammarPool;
-
- /**
- * Constructor for XMLGrammarBuilderTest.
- * @param name
- */
- public XMLGrammarBuilderTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- XMLGrammarPreparser preparser;
-
- // set up symbol table and grammar pool
- symbolTable = new SymbolTable(BIG_PRIME);
- grammarPool = new XMLGrammarPoolImpl();
- preparser = new XMLGrammarPreparser(symbolTable);
- preparser.registerPreparser(XMLGrammarDescription.XML_SCHEMA, null);
- preparser.setProperty(GRAMMAR_POOL, grammarPool);
- preparser.setFeature(NAMESPACES_FEATURE_ID, true);
- preparser.setFeature(VALIDATION_FEATURE_ID, true);
- // now we can still do schema features just in case,
- // so long as it's our configuraiton......
- preparser.setFeature(SCHEMA_VALIDATION_FEATURE_ID, true);
- preparseSchemaResource(
- preparser,
- Constants.DSIG_SCHEMA_LOCATION,
- "/resources/schemas/xmldsig-core-schema.xsd");
- }
-
- private static Grammar preparseSchemaResource(
- XMLGrammarPreparser preparser,
- String systemId,
- String resource)
- throws Exception {
-
- InputStream is = XMLGrammarBuilderTest.class.getResourceAsStream(resource);
- return preparser.preparseGrammar(
- XMLGrammarDescription.XML_SCHEMA,
- new XMLInputSource(null, systemId, null, is, null));
- }
-
- public void testParseValidating() throws Exception {
- DOMParser parser = new DOMParser(symbolTable, grammarPool);
-
- parser.setFeature(NAMESPACES_FEATURE_ID, true);
- parser.setFeature(VALIDATION_FEATURE_ID, true);
- parser.setFeature(SCHEMA_VALIDATION_FEATURE_ID, true);
-
- parser.parse(
- new InputSource(
- new FileInputStream(TESTDATA_ROOT + "xml/dsigTransform/base64.xml")));
- parser.getDocument();
- }
-
-}
diff --git a/common/src/test/at/gv/egovernment/moa/util/XPathUtilsTest.java b/common/src/test/at/gv/egovernment/moa/util/XPathUtilsTest.java
deleted file mode 100644
index 559494300..000000000
--- a/common/src/test/at/gv/egovernment/moa/util/XPathUtilsTest.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package test.at.gv.egovernment.moa.util;
-import org.w3c.dom.Document;
-import org.w3c.dom.NodeList;
-
-import test.at.gv.egovernment.moa.MOATestCase;
-
-import at.gv.egovernment.moa.util.XPathUtils;
-
-
-/**
- * @author Patrick Peck
- * @version $Id$
- */
-public class XPathUtilsTest extends MOATestCase {
-
- private Document doc1;
-
- /**
- * Constructor for XPathUtilsTest.
- * @param name
- */
- public XPathUtilsTest(String name) {
- super(name);
- }
-
- /**
- * @see TestCase#setUp()
- */
- protected void setUp() throws Exception {
- super.setUp();
- doc1 =
- parseXml(TESTDATA_ROOT + "xml/VerifyXMLSignature/Req000.xml");
- }
-
- public void testSelectNodeList() throws Exception {
- NodeList nodes;
-
- nodes =
- XPathUtils.selectNodeList(
- doc1.getDocumentElement(),
- doc1.getDocumentElement(),
- "/VerifyXMLSignatureRequest");
- assertEquals(1, nodes.getLength());
- nodes =
- XPathUtils.selectNodeList(
- doc1.getDocumentElement(),
- "//dsig:Signature");
- assertEquals(1, nodes.getLength());
- }
-
-}