From 691b03daf5957d576209e5341597b28c20fd4818 Mon Sep 17 00:00:00 2001 From: "Singal, Kapil (ks220y)" Date: Tue, 16 Mar 2021 00:37:42 -0400 Subject: modernizing propertyProvider by replacing Vector to ArrayList Issue-ID: CCSDK-3213 Signed-off-by: Singal, Kapil (ks220y) Change-Id: Ifcc3f618512f1f5a347b8045e54ba82d0e21d6dd --- .../org/onap/ccsdk/sli/plugins/template/TemplateNodeTest.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'plugins/template-node/provider/src/test') 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 loader = (Vector) t.ve.getProperty(RuntimeConstants.RESOURCE_LOADER); + List loader = (List) 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 loader = (Vector) t.ve.getProperty(RuntimeConstants.RESOURCE_LOADER); + List loader = (List) 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 -- cgit 1.2.3-korg