summaryrefslogtreecommitdiff
path: root/same/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'same/src/test')
-rw-r--r--same/src/test/java/com/orbekk/same/config/ConfigurationTest.java17
-rw-r--r--same/src/test/resources/com/orbekk/same/config/test.properties1
2 files changed, 18 insertions, 0 deletions
diff --git a/same/src/test/java/com/orbekk/same/config/ConfigurationTest.java b/same/src/test/java/com/orbekk/same/config/ConfigurationTest.java
new file mode 100644
index 0000000..e5b42aa
--- /dev/null
+++ b/same/src/test/java/com/orbekk/same/config/ConfigurationTest.java
@@ -0,0 +1,17 @@
+package com.orbekk.same.config;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+public class ConfigurationTest {
+ @Test public void testLoadConfiguration() {
+ String resources = "src/test/resources/";
+ System.setProperty(Configuration.configurationProperty,
+ resources + "com/orbekk/same/config/test.properties");
+ Configuration configuration = Configuration.load();
+ assertEquals("Test Value",
+ configuration.getProperty("testProperty"));
+
+ }
+}
diff --git a/same/src/test/resources/com/orbekk/same/config/test.properties b/same/src/test/resources/com/orbekk/same/config/test.properties
new file mode 100644
index 0000000..45e1cc4
--- /dev/null
+++ b/same/src/test/resources/com/orbekk/same/config/test.properties
@@ -0,0 +1 @@
+testProperty=Test Value