aboutsummaryrefslogtreecommitdiff
path: root/eidas_modules/authmodule-eIDAS-v2/src/test
diff options
context:
space:
mode:
authorThomas Lenz <thomas.lenz@egiz.gv.at>2019-12-10 09:13:43 +0100
committerThomas Lenz <thomas.lenz@egiz.gv.at>2019-12-10 09:13:43 +0100
commit8b0e6296527b6239d3fda64efe1c858e1cca6e3c (patch)
tree8723c6de20118d373887e121dc8871cf1e1d66a7 /eidas_modules/authmodule-eIDAS-v2/src/test
parentb56eba86c98eabcf3dbc1507c60508ee94935144 (diff)
downloadNational_eIDAS_Gateway-8b0e6296527b6239d3fda64efe1c858e1cca6e3c.tar.gz
National_eIDAS_Gateway-8b0e6296527b6239d3fda64efe1c858e1cca6e3c.tar.bz2
National_eIDAS_Gateway-8b0e6296527b6239d3fda64efe1c858e1cca6e3c.zip
some more jUnit test modifications
Diffstat (limited to 'eidas_modules/authmodule-eIDAS-v2/src/test')
-rw-r--r--eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/EidasAuthenticationModulImplTest.java10
-rw-r--r--eidas_modules/authmodule-eIDAS-v2/src/test/resources/SpringTest-context_basic_test.xml2
2 files changed, 9 insertions, 3 deletions
diff --git a/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/EidasAuthenticationModulImplTest.java b/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/EidasAuthenticationModulImplTest.java
index f6a3ec2e..c66d8ec0 100644
--- a/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/EidasAuthenticationModulImplTest.java
+++ b/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/EidasAuthenticationModulImplTest.java
@@ -1,16 +1,20 @@
package at.asitplus.eidas.specific.modules.auth.eidas.v2.test;
+import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.lang3.RandomStringUtils;
import org.junit.Assert;
import org.junit.Before;
+import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.Resource;
import org.springframework.core.io.ResourceLoader;
+import org.springframework.test.annotation.DirtiesContext;
+import org.springframework.test.annotation.DirtiesContext.ClassMode;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@@ -27,6 +31,7 @@ import at.gv.egiz.eaaf.core.impl.idp.process.ExecutionContextImpl;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("/SpringTest-context_tasks_test.xml")
+@DirtiesContext(classMode = ClassMode.BEFORE_CLASS)
public class EidasAuthenticationModulImplTest {
@Autowired ModuleRegistration moduleReg;
@@ -41,10 +46,11 @@ public class EidasAuthenticationModulImplTest {
* jUnit class initializer.
*
*/
- public static void classInitializer() {
+ @BeforeClass
+ public static void classInitializer() throws IOException {
final String current = new java.io.File(".").toURI().toString();
System.setProperty("eidas.ms.configuration", current + "../../basicConfig/default_config.properties");
-
+
}
/**
diff --git a/eidas_modules/authmodule-eIDAS-v2/src/test/resources/SpringTest-context_basic_test.xml b/eidas_modules/authmodule-eIDAS-v2/src/test/resources/SpringTest-context_basic_test.xml
index 7bf2282f..f1f13391 100644
--- a/eidas_modules/authmodule-eIDAS-v2/src/test/resources/SpringTest-context_basic_test.xml
+++ b/eidas_modules/authmodule-eIDAS-v2/src/test/resources/SpringTest-context_basic_test.xml
@@ -38,7 +38,7 @@
<bean id="BasicMSSpecificNodeConfig"
class="at.asitplus.eidas.specific.connector.config.BasicConfigurationProvider">
<constructor-arg
- value="#{systemProperties['eidas.ms.configuration'] != null ? systemProperties['eidas.ms.configuration'] : 'file:/F:/Projekte/configs/ms_connector/default_config.properties' }" />
+ value="#{systemProperties['eidas.ms.configuration']}" />
</bean>
</beans> \ No newline at end of file