1 package org.onap.appc.flow.controller.node;
3 import java.io.FileNotFoundException;
4 import java.io.IOException;
5 import java.util.Properties;
6 import org.junit.Assert;
9 import org.junit.rules.ExpectedException;
11 public class PropertiesLoaderTest {
14 public ExpectedException expectedException = ExpectedException.none();
17 public void should_load_property_file() throws IOException {
18 Properties properties = PropertiesLoader.load("src/test/resources/properties_loader.properties");
20 Assert.assertEquals("OK", properties.getProperty("test"));
24 public void should_throw_if_file_does_not_exists() throws IOException {
25 expectedException.expect(FileNotFoundException.class);
26 PropertiesLoader.load("src/test/resources/non_existent.properties");