summaryrefslogtreecommitdiffstats
path: root/appc-config/appc-flow-controller/provider/src/test/java/org/onap/appc/flow/controller/node/PropertiesLoaderTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'appc-config/appc-flow-controller/provider/src/test/java/org/onap/appc/flow/controller/node/PropertiesLoaderTest.java')
-rw-r--r--appc-config/appc-flow-controller/provider/src/test/java/org/onap/appc/flow/controller/node/PropertiesLoaderTest.java29
1 files changed, 29 insertions, 0 deletions
diff --git a/appc-config/appc-flow-controller/provider/src/test/java/org/onap/appc/flow/controller/node/PropertiesLoaderTest.java b/appc-config/appc-flow-controller/provider/src/test/java/org/onap/appc/flow/controller/node/PropertiesLoaderTest.java
new file mode 100644
index 000000000..66bf802c3
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/test/java/org/onap/appc/flow/controller/node/PropertiesLoaderTest.java
@@ -0,0 +1,29 @@
+package org.onap.appc.flow.controller.node;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.Properties;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+
+public class PropertiesLoaderTest {
+
+ @Rule
+ public ExpectedException expectedException = ExpectedException.none();
+
+ @Test
+ public void should_load_property_file() throws IOException {
+ Properties properties = PropertiesLoader.load("src/test/resources/properties_loader.properties");
+
+ Assert.assertEquals("OK", properties.getProperty("test"));
+ }
+
+ @Test
+ public void should_throw_if_file_does_not_exists() throws IOException {
+ expectedException.expect(FileNotFoundException.class);
+ PropertiesLoader.load("src/test/resources/non_existent.properties");
+ }
+
+} \ No newline at end of file