diff options
author | Thomas Lenz <thomas.lenz@egiz.gv.at> | 2019-12-10 09:13:43 +0100 |
---|---|---|
committer | Thomas Lenz <thomas.lenz@egiz.gv.at> | 2019-12-10 09:13:43 +0100 |
commit | 8b0e6296527b6239d3fda64efe1c858e1cca6e3c (patch) | |
tree | 8723c6de20118d373887e121dc8871cf1e1d66a7 /connector/src/test | |
parent | b56eba86c98eabcf3dbc1507c60508ee94935144 (diff) | |
download | National_eIDAS_Gateway-8b0e6296527b6239d3fda64efe1c858e1cca6e3c.tar.gz National_eIDAS_Gateway-8b0e6296527b6239d3fda64efe1c858e1cca6e3c.tar.bz2 National_eIDAS_Gateway-8b0e6296527b6239d3fda64efe1c858e1cca6e3c.zip |
some more jUnit test modifications
Diffstat (limited to 'connector/src/test')
-rw-r--r-- | connector/src/test/java/at/asitplus/eidas/specific/connector/test/CountrySelectionProcessImplTest.java | 5 | ||||
-rw-r--r-- | connector/src/test/resources/spring/SpringTest-context_basic_test.xml | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/connector/src/test/java/at/asitplus/eidas/specific/connector/test/CountrySelectionProcessImplTest.java b/connector/src/test/java/at/asitplus/eidas/specific/connector/test/CountrySelectionProcessImplTest.java index 9e6e1003..455288f5 100644 --- a/connector/src/test/java/at/asitplus/eidas/specific/connector/test/CountrySelectionProcessImplTest.java +++ b/connector/src/test/java/at/asitplus/eidas/specific/connector/test/CountrySelectionProcessImplTest.java @@ -6,11 +6,14 @@ 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 +30,7 @@ import at.gv.egiz.eaaf.core.impl.idp.process.ExecutionContextImpl; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration("/spring/SpringTest-context_basic_test.xml") +@DirtiesContext(classMode = ClassMode.BEFORE_CLASS) public class CountrySelectionProcessImplTest { @Autowired ModuleRegistration moduleReg; @@ -41,6 +45,7 @@ public class CountrySelectionProcessImplTest { * jUnit class initializer. * */ + @BeforeClass public static void classInitializer() { final String current = new java.io.File(".").toURI().toString(); System.setProperty("eidas.ms.configuration", current + "../basicConfig/default_config.properties"); diff --git a/connector/src/test/resources/spring/SpringTest-context_basic_test.xml b/connector/src/test/resources/spring/SpringTest-context_basic_test.xml index 8121c0b5..5d052be9 100644 --- a/connector/src/test/resources/spring/SpringTest-context_basic_test.xml +++ b/connector/src/test/resources/spring/SpringTest-context_basic_test.xml @@ -16,7 +16,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 |