summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Lenz <thomas.lenz@egiz.gv.at>2020-02-18 08:15:37 +0100
committerThomas Lenz <thomas.lenz@egiz.gv.at>2020-02-18 08:15:37 +0100
commita69bc718249123a0d2048d853a6fc9c7c1f7e644 (patch)
tree3ddd2952a3831d683276bc7858d22a64448b9329
parentfa5a20b936108280814111dc3d39c8b47c65dd8d (diff)
downloadEAAF-Components-a69bc718249123a0d2048d853a6fc9c7c1f7e644.tar.gz
EAAF-Components-a69bc718249123a0d2048d853a6fc9c7c1f7e644.tar.bz2
EAAF-Components-a69bc718249123a0d2048d853a6fc9c7c1f7e644.zip
update jUnit test for module specific message sources
-rw-r--r--eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/impl/logging/EaafUtilsMessageSourceTest.java23
-rw-r--r--eaaf_modules/eaaf_module_pvp2_core/src/test/java/at/gv/egiz/eaaf/modules/pvp2/test/PvpCoreMessageSourceTest.java19
-rw-r--r--eaaf_modules/eaaf_module_pvp2_sp/src/test/java/at/gv/egiz/eaaf/modules/pvp2/sp/test/PvpSpMessageSourceTest.java19
3 files changed, 35 insertions, 26 deletions
diff --git a/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/impl/logging/EaafUtilsMessageSourceTest.java b/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/impl/logging/EaafUtilsMessageSourceTest.java
index f6df60ae..53ea54dc 100644
--- a/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/impl/logging/EaafUtilsMessageSourceTest.java
+++ b/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/impl/logging/EaafUtilsMessageSourceTest.java
@@ -1,5 +1,9 @@
package at.gv.egiz.eaaf.core.impl.logging;
+import java.util.List;
+
+import at.gv.egiz.eaaf.core.api.logging.IMessageSourceLocation;
+
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -9,8 +13,6 @@ import org.springframework.core.io.ResourceLoader;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-import at.gv.egiz.eaaf.core.api.logging.IMessageSourceLocation;
-
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("/spring/test_eaaf_pvp_not_lazy.beans.xml")
public class EaafUtilsMessageSourceTest {
@@ -18,19 +20,20 @@ public class EaafUtilsMessageSourceTest {
@Autowired
private ResourceLoader loader;
@Autowired(required = false)
- private IMessageSourceLocation messageSource;
+ private List<IMessageSourceLocation> messageSources;
@Test
- public void simpleTests() {
- Assert.assertNotNull("No messageSource", messageSource);
+ public void checkMessageSources() {
+ Assert.assertNotNull("No messageSource", messageSources);
- Assert.assertNotNull("No sourcePath", messageSource.getMessageSourceLocation());
+ for (final IMessageSourceLocation messageSource : messageSources) {
+ Assert.assertNotNull("No sourcePath", messageSource.getMessageSourceLocation());
- for (final String el : messageSource.getMessageSourceLocation()) {
- final Resource messages = loader.getResource(el + ".properties");
- Assert.assertTrue("Source not exist", messages.exists());
+ for (final String el : messageSource.getMessageSourceLocation()) {
+ final Resource messages = loader.getResource(el + ".properties");
+ Assert.assertTrue("Source not exist", messages.exists());
+ }
}
-
}
}
diff --git a/eaaf_modules/eaaf_module_pvp2_core/src/test/java/at/gv/egiz/eaaf/modules/pvp2/test/PvpCoreMessageSourceTest.java b/eaaf_modules/eaaf_module_pvp2_core/src/test/java/at/gv/egiz/eaaf/modules/pvp2/test/PvpCoreMessageSourceTest.java
index 61bffa7c..cc15df90 100644
--- a/eaaf_modules/eaaf_module_pvp2_core/src/test/java/at/gv/egiz/eaaf/modules/pvp2/test/PvpCoreMessageSourceTest.java
+++ b/eaaf_modules/eaaf_module_pvp2_core/src/test/java/at/gv/egiz/eaaf/modules/pvp2/test/PvpCoreMessageSourceTest.java
@@ -1,5 +1,7 @@
package at.gv.egiz.eaaf.modules.pvp2.test;
+import java.util.List;
+
import at.gv.egiz.eaaf.core.api.logging.IMessageSourceLocation;
import org.junit.Assert;
@@ -21,19 +23,20 @@ public class PvpCoreMessageSourceTest {
@Autowired
private ResourceLoader loader;
@Autowired(required = false)
- private IMessageSourceLocation messageSource;
+ private List<IMessageSourceLocation> messageSources;
@Test
- public void simpleTests() {
- Assert.assertNotNull("No messageSource", messageSource);
+ public void checkMessageSources() {
+ Assert.assertNotNull("No messageSource", messageSources);
- Assert.assertNotNull("No sourcePath", messageSource.getMessageSourceLocation());
+ for (final IMessageSourceLocation messageSource : messageSources) {
+ Assert.assertNotNull("No sourcePath", messageSource.getMessageSourceLocation());
- for (final String el : messageSource.getMessageSourceLocation()) {
- final Resource messages = loader.getResource(el + ".properties");
- Assert.assertTrue("Source not exist", messages.exists());
+ for (final String el : messageSource.getMessageSourceLocation()) {
+ final Resource messages = loader.getResource(el + ".properties");
+ Assert.assertTrue("Source not exist", messages.exists());
+ }
}
-
}
}
diff --git a/eaaf_modules/eaaf_module_pvp2_sp/src/test/java/at/gv/egiz/eaaf/modules/pvp2/sp/test/PvpSpMessageSourceTest.java b/eaaf_modules/eaaf_module_pvp2_sp/src/test/java/at/gv/egiz/eaaf/modules/pvp2/sp/test/PvpSpMessageSourceTest.java
index 34ac9b5a..90bb084a 100644
--- a/eaaf_modules/eaaf_module_pvp2_sp/src/test/java/at/gv/egiz/eaaf/modules/pvp2/sp/test/PvpSpMessageSourceTest.java
+++ b/eaaf_modules/eaaf_module_pvp2_sp/src/test/java/at/gv/egiz/eaaf/modules/pvp2/sp/test/PvpSpMessageSourceTest.java
@@ -1,5 +1,7 @@
package at.gv.egiz.eaaf.modules.pvp2.sp.test;
+import java.util.List;
+
import at.gv.egiz.eaaf.core.api.logging.IMessageSourceLocation;
import org.junit.Assert;
@@ -18,19 +20,20 @@ public class PvpSpMessageSourceTest {
@Autowired
private ResourceLoader loader;
@Autowired(required = false)
- private IMessageSourceLocation messageSource;
+ private List<IMessageSourceLocation> messageSources;
@Test
- public void simpleTests() {
- Assert.assertNotNull("No messageSource", messageSource);
+ public void checkMessageSources() {
+ Assert.assertNotNull("No messageSource", messageSources);
- Assert.assertNotNull("No sourcePath", messageSource.getMessageSourceLocation());
+ for (final IMessageSourceLocation messageSource : messageSources) {
+ Assert.assertNotNull("No sourcePath", messageSource.getMessageSourceLocation());
- for (final String el : messageSource.getMessageSourceLocation()) {
- final Resource messages = loader.getResource(el + ".properties");
- Assert.assertTrue("Source not exist", messages.exists());
+ for (final String el : messageSource.getMessageSourceLocation()) {
+ final Resource messages = loader.getResource(el + ".properties");
+ Assert.assertTrue("Source not exist", messages.exists());
+ }
}
-
}
}