diff options
author | Singal, Kapil (ks220y) <ks220y@att.com> | 2021-03-16 00:37:42 -0400 |
---|---|---|
committer | Singal, Kapil (ks220y) <ks220y@att.com> | 2021-03-16 00:37:42 -0400 |
commit | 691b03daf5957d576209e5341597b28c20fd4818 (patch) | |
tree | 59f11ad8c30bb42203d44344ae350c60af137a74 /plugins/template-node/provider/src | |
parent | cb07500090e0c50929e7543a63b42ff5b8dc12e3 (diff) |
modernizing propertyProvider by replacing Vector to ArrayList
Issue-ID: CCSDK-3213
Signed-off-by: Singal, Kapil (ks220y) <ks220y@att.com>
Change-Id: Ifcc3f618512f1f5a347b8045e54ba82d0e21d6dd
Diffstat (limited to 'plugins/template-node/provider/src')
-rw-r--r-- | plugins/template-node/provider/src/test/java/org/onap/ccsdk/sli/plugins/template/TemplateNodeTest.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/template-node/provider/src/test/java/org/onap/ccsdk/sli/plugins/template/TemplateNodeTest.java b/plugins/template-node/provider/src/test/java/org/onap/ccsdk/sli/plugins/template/TemplateNodeTest.java index 29c5c973e..053debe04 100644 --- a/plugins/template-node/provider/src/test/java/org/onap/ccsdk/sli/plugins/template/TemplateNodeTest.java +++ b/plugins/template-node/provider/src/test/java/org/onap/ccsdk/sli/plugins/template/TemplateNodeTest.java @@ -2,10 +2,11 @@ package org.onap.ccsdk.sli.plugins.template; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import java.util.HashMap; +import java.util.List; import java.util.Map; -import java.util.Vector; import org.apache.velocity.runtime.RuntimeConstants; import org.junit.Test; import org.onap.ccsdk.sli.core.sli.SvcLogicContext; @@ -64,7 +65,7 @@ public class TemplateNodeTest { public void withProperties() throws Exception { System.setProperty(TemplateNode.PROPERTIES_DIR_KEY, "src/test/resources"); TemplateNode t = new TemplateNode(); - Vector<String> loader = (Vector<String>) t.ve.getProperty(RuntimeConstants.RESOURCE_LOADER); + List<String> loader = (List<String>) t.ve.getProperty(RuntimeConstants.RESOURCE_LOADER); assertTrue(loader.contains("class")); assertEquals("/home/my/example", t.ve.getProperty(RuntimeConstants.FILE_RESOURCE_LOADER_PATH)); assertEquals("true", t.ve.getProperty(RuntimeConstants.FILE_RESOURCE_LOADER_CACHE)); @@ -75,11 +76,11 @@ public class TemplateNodeTest { public void withNoProperties() throws Exception { System.setProperty(TemplateNode.PROPERTIES_DIR_KEY, "i/do/not/exist"); TemplateNode t = new TemplateNode(); - Vector<String> loader = (Vector<String>) t.ve.getProperty(RuntimeConstants.RESOURCE_LOADER); + List<String> loader = (List<String>) t.ve.getProperty(RuntimeConstants.RESOURCE_LOADER); assertTrue(loader.contains("file")); assertEquals("/opt/onap/sdnc/restapi/templates", t.ve.getProperty(RuntimeConstants.FILE_RESOURCE_LOADER_PATH)); assertEquals("false", t.ve.getProperty(RuntimeConstants.FILE_RESOURCE_LOADER_CACHE)); - assertEquals(null, t.ve.getProperty("custom.property")); + assertNull(t.ve.getProperty("custom.property")); } }
\ No newline at end of file |