summaryrefslogtreecommitdiffstats
path: root/src/test/java/com/att/nsa
diff options
context:
space:
mode:
authorVarun Gudisena <vg411h@att.com>2017-10-04 01:13:29 -0500
committerVarun Gudisena <vg411h@att.com>2017-10-04 01:13:39 -0500
commitc1db5e88f5db89df99cc2cccd25e830d6bfaac1f (patch)
tree57790798efe0d6576fdb3ed59a550b50eeb5bcef /src/test/java/com/att/nsa
parente9adb1321b864d9ba6d1c8385206d2f1ac5b3a82 (diff)
Add unit test cases
Issue-Id: DMAAP-151 Change-Id: I380fd88c4cbe51e4b13b38d71a9d492ff864813a Signed-off-by: Varun Gudisena <vg411h@att.com>
Diffstat (limited to 'src/test/java/com/att/nsa')
-rw-r--r--src/test/java/com/att/nsa/dmaap/filemonitor/ServicePropertiesMapTest.java15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/test/java/com/att/nsa/dmaap/filemonitor/ServicePropertiesMapTest.java b/src/test/java/com/att/nsa/dmaap/filemonitor/ServicePropertiesMapTest.java
index df3695e..d4e9838 100644
--- a/src/test/java/com/att/nsa/dmaap/filemonitor/ServicePropertiesMapTest.java
+++ b/src/test/java/com/att/nsa/dmaap/filemonitor/ServicePropertiesMapTest.java
@@ -70,15 +70,20 @@ public class ServicePropertiesMapTest {
@Test()
public void testRefreshJsonFile() throws Exception {
- Path resourceDirectory = Paths.get("src/test/resources");
- map.refresh(new File(resourceDirectory+"\\"+"test.json"));
- assertTrue(true);
+ //Path resourceDirectory = Paths.get("src/test/resources");
+ // map.refresh(new File(resourceDirectory+"\\"+"test.json"));
+ ClassLoader classLoader = getClass().getClassLoader();
+ map.refresh(new File(classLoader.getResource("test.json").getFile()));
+
+ assertTrue(true);
}
@Test
public void testRefreshPropsFile() throws Exception {
- Path resourceDirectory = Paths.get("src/test/resources");
- map.refresh(new File(resourceDirectory+"\\"+"test.properties"));
+ /*Path resourceDirectory = Paths.get("src/test/resources");
+ map.refresh(new File(resourceDirectory+"\\"+"test.properties"));*/
+ ClassLoader classLoader = getClass().getClassLoader();
+ map.refresh(new File(classLoader.getResource("test.json").getFile()));
assertTrue(true);
}