aboutsummaryrefslogtreecommitdiff
path: root/connector/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'connector/src/test/java')
-rw-r--r--connector/src/test/java/at/asitplus/eidas/specific/connector/test/AuthnRequestValidatorTest.java24
1 files changed, 12 insertions, 12 deletions
diff --git a/connector/src/test/java/at/asitplus/eidas/specific/connector/test/AuthnRequestValidatorTest.java b/connector/src/test/java/at/asitplus/eidas/specific/connector/test/AuthnRequestValidatorTest.java
index db863815..e34c8036 100644
--- a/connector/src/test/java/at/asitplus/eidas/specific/connector/test/AuthnRequestValidatorTest.java
+++ b/connector/src/test/java/at/asitplus/eidas/specific/connector/test/AuthnRequestValidatorTest.java
@@ -12,11 +12,11 @@ import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.opensaml.saml2.core.AuthnRequest;
-import org.opensaml.xml.ConfigurationException;
-import org.opensaml.xml.io.Unmarshaller;
-import org.opensaml.xml.io.UnmarshallerFactory;
-import org.opensaml.xml.io.UnmarshallingException;
+import org.opensaml.core.config.InitializationException;
+import org.opensaml.core.xml.io.Unmarshaller;
+import org.opensaml.core.xml.io.UnmarshallingException;
+import org.opensaml.core.xml.util.XMLObjectSupport;
+import org.opensaml.saml.saml2.core.AuthnRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
@@ -38,7 +38,8 @@ import at.gv.egiz.eaaf.core.exceptions.AuthnRequestValidatorException;
import at.gv.egiz.eaaf.core.impl.idp.module.test.TestRequestImpl;
import at.gv.egiz.eaaf.core.impl.utils.DomUtils;
import at.gv.egiz.eaaf.modules.pvp2.api.validation.IAuthnRequestPostProcessor;
-import at.gv.egiz.eaaf.modules.pvp2.impl.opensaml.initialize.EaafDefaultSaml2Bootstrap;
+import at.gv.egiz.eaaf.modules.pvp2.impl.opensaml.initialize.EaafOpenSaml3xInitializer;
+import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration({
@@ -61,15 +62,16 @@ public class AuthnRequestValidatorTest {
/**
* jUnit class initializer.
- * @throws ConfigurationException In case of an error
+ * @throws ComponentInitializationException In case of an error
+ * @throws InitializationException In case of an error
*
*/
@BeforeClass
- public static void classInitializer() throws ConfigurationException {
+ public static void classInitializer() throws InitializationException, ComponentInitializationException {
final String current = new java.io.File(".").toURI().toString();
System.setProperty("eidas.ms.configuration", current + "src/test/resources/config/junit_config_1.properties");
- EaafDefaultSaml2Bootstrap.bootstrap();
+ EaafOpenSaml3xInitializer.eaafInitialize();
}
/**
@@ -286,9 +288,7 @@ public class AuthnRequestValidatorTest {
final Element authBlockDom =
DomUtils.parseXmlValidating(AuthnRequestValidatorTest.class.getResourceAsStream(resource));
- final UnmarshallerFactory unmarshallerFactory =
- org.opensaml.xml.Configuration.getUnmarshallerFactory();
- final Unmarshaller unmarshaller = unmarshallerFactory.getUnmarshaller(authBlockDom);
+ final Unmarshaller unmarshaller = XMLObjectSupport.getUnmarshaller(authBlockDom);
return (AuthnRequest) unmarshaller.unmarshall(authBlockDom);
}