diff options
author | Thomas Lenz <thomas.lenz@egiz.gv.at> | 2019-09-11 07:06:36 +0200 |
---|---|---|
committer | Thomas Lenz <thomas.lenz@egiz.gv.at> | 2019-09-11 07:06:36 +0200 |
commit | 322aaeb442d0d1e1744e60416aa4e434985dd36e (patch) | |
tree | 05663db1993aee4f0b47d025fb7dabbd5c9d8413 /eidas_modules/authmodule-eIDAS-v2/src | |
parent | 8417b6e54f200d424d3b0c5d5a89b161e6bfbede (diff) | |
download | National_eIDAS_Gateway-322aaeb442d0d1e1744e60416aa4e434985dd36e.tar.gz National_eIDAS_Gateway-322aaeb442d0d1e1744e60416aa4e434985dd36e.tar.bz2 National_eIDAS_Gateway-322aaeb442d0d1e1744e60416aa4e434985dd36e.zip |
fix broken jUnit test
Diffstat (limited to 'eidas_modules/authmodule-eIDAS-v2/src')
-rw-r--r-- | eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/test/eidas/specific/modules/authmodule_eIDASv2/eIDASAttributePostProcessingTest.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/test/eidas/specific/modules/authmodule_eIDASv2/eIDASAttributePostProcessingTest.java b/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/test/eidas/specific/modules/authmodule_eIDASv2/eIDASAttributePostProcessingTest.java index ed09ea2d..cd7895ba 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/test/eidas/specific/modules/authmodule_eIDASv2/eIDASAttributePostProcessingTest.java +++ b/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/test/eidas/specific/modules/authmodule_eIDASv2/eIDASAttributePostProcessingTest.java @@ -24,11 +24,13 @@ package at.asitplus.test.eidas.specific.modules.authmodule_eIDASv2; import static org.junit.Assert.fail; +import java.io.File; import java.text.SimpleDateFormat; import java.util.HashMap; import java.util.Map; import org.joda.time.DateTime; +import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; @@ -43,6 +45,18 @@ import at.asitplus.eidas.specific.modules.authmodule_eIDASv2.service.EIDPostProc @ContextConfiguration("/SpringTest-context_basic_test.xml") public class eIDASAttributePostProcessingTest { + @BeforeClass + public static void classInitializer() throws Exception { + final String currentDir = new java.io.File( "." ).getCanonicalPath(); + File configFile = new java.io.File(currentDir + "./../../basicConfig/default_config.properties"); + if (!configFile.exists()) { + throw new Exception("Default Configuration not found. Test will will be FAIL"); + + } + System.setProperty("eidas.ms.configuration", configFile.toURI().toASCIIString()); + + } + @Autowired private EIDPostProcessingService postProcessor; //lower case |