aboutsummaryrefslogtreecommitdiff
path: root/eidas_modules/authmodule-eIDAS-v2
diff options
context:
space:
mode:
authorThomas <>2021-08-09 16:50:51 +0200
committerThomas <>2021-08-09 16:50:51 +0200
commit847e690da4a2f6b08ca604538f1f42e6e6717d0b (patch)
tree9fb2446e2f8fbb89bb00889fa749ffabf0c5e765 /eidas_modules/authmodule-eIDAS-v2
parent3cf7ae03f6b0ae7cfa5061869edaad6b9550e57a (diff)
downloadNational_eIDAS_Gateway-847e690da4a2f6b08ca604538f1f42e6e6717d0b.tar.gz
National_eIDAS_Gateway-847e690da4a2f6b08ca604538f1f42e6e6717d0b.tar.bz2
National_eIDAS_Gateway-847e690da4a2f6b08ca604538f1f42e6e6717d0b.zip
add ZMR-client test for development only that can be activated by Spring-Profile and uses real ZMR T-Stage
(key material for authentication has to be available on local machine)
Diffstat (limited to 'eidas_modules/authmodule-eIDAS-v2')
-rw-r--r--eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/clients/ZmrClientProductionTest.java43
1 files changed, 43 insertions, 0 deletions
diff --git a/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/clients/ZmrClientProductionTest.java b/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/clients/ZmrClientProductionTest.java
new file mode 100644
index 00000000..5f3c5a55
--- /dev/null
+++ b/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/clients/ZmrClientProductionTest.java
@@ -0,0 +1,43 @@
+package at.asitplus.eidas.specific.modules.auth.eidas.v2.test.clients;
+
+import static org.junit.Assert.assertNotNull;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.test.annotation.IfProfileValue;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.TestPropertySource;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+
+import at.asitplus.eidas.specific.modules.auth.eidas.v2.clients.zmr.ZmrSoapClient;
+import at.asitplus.eidas.specific.modules.auth.eidas.v2.clients.zmr.ZmrSoapClient.ZmrRegisterResult;
+import at.asitplus.eidas.specific.modules.auth.eidas.v2.exception.EidasSAuthenticationException;
+import at.gv.egiz.eaaf.core.api.idp.IConfiguration;
+
+@IfProfileValue(name = "spring.profiles.active", value = "devEnvironment")
+@RunWith(SpringJUnit4ClassRunner.class)
+@ContextConfiguration(locations = {
+ "/SpringTest-context_tasks_test.xml",
+ "/SpringTest-context_basic_realConfig.xml"})
+@TestPropertySource(locations = {
+ //"classpath:/application.properties",
+ "file:/home/tlenz/Projekte/config/ms_connector/default_config.properties",
+ })
+public class ZmrClientProductionTest {
+
+ @Autowired ZmrSoapClient client;
+ @Autowired IConfiguration basicConfig;
+
+ @Test
+ public void mdsSearch() throws EidasSAuthenticationException {
+
+ ZmrRegisterResult result = client.searchWithMds(null,
+ "Thomas", "Lenz", "1982-09-06",
+ "AT");
+
+ assertNotNull("ZMR response", result);
+
+ }
+
+}