summaryrefslogtreecommitdiffstats
path: root/appc-config/appc-config-params/provider/src/test
diff options
context:
space:
mode:
authorSandeep J <sandeejh@in.ibm.com>2018-08-12 18:43:11 +0530
committerTakamune Cho <tc012c@att.com>2018-08-17 00:32:20 +0000
commit281b9a5f548087749ca89da62086f6ff064c5eff (patch)
tree3c094ea573a4c258532f7657336e563ce3b6b704 /appc-config/appc-config-params/provider/src/test
parent9922c9250a5419c726be6fae9ffb083e365d49e0 (diff)
added test case to TestPropertyDefinitionNode.java
to increase code coverage Issue-ID: APPC-1086 Change-Id: If07e7542e7f9eeebd4d7956227128106d77457cb Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
Diffstat (limited to 'appc-config/appc-config-params/provider/src/test')
-rw-r--r--appc-config/appc-config-params/provider/src/test/java/org/onap/sdnc/config/params/parser/TestPropertyDefinitionNode.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/appc-config/appc-config-params/provider/src/test/java/org/onap/sdnc/config/params/parser/TestPropertyDefinitionNode.java b/appc-config/appc-config-params/provider/src/test/java/org/onap/sdnc/config/params/parser/TestPropertyDefinitionNode.java
index dbadef85a..cd2e86498 100644
--- a/appc-config/appc-config-params/provider/src/test/java/org/onap/sdnc/config/params/parser/TestPropertyDefinitionNode.java
+++ b/appc-config/appc-config-params/provider/src/test/java/org/onap/sdnc/config/params/parser/TestPropertyDefinitionNode.java
@@ -34,7 +34,6 @@ import java.util.HashMap;
import java.util.Map;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.StringUtils;
-import org.junit.Ignore;
import org.junit.Test;
import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
import org.onap.ccsdk.sli.core.sli.SvcLogicException;
@@ -64,6 +63,19 @@ public class TestPropertyDefinitionNode {
ParamsHandlerConstant.OUTPUT_STATUS_SUCCESS);
}
+
+ @Test(expected= SvcLogicException.class)
+ public void testInProcessMissingParamKeysForEmptyPdContent() throws Exception {
+ PropertyDefinitionNode propertyDefinitionNode = new PropertyDefinitionNode();
+ Map<String, String> inParams = new HashMap<String, String>();
+ inParams.put(ParamsHandlerConstant.INPUT_PARAM_RESPONSE_PRIFIX, "test");
+ String jsonData = IOUtils.toString(TestPropertyDefinitionNode.class.getClassLoader()
+ .getResourceAsStream("parser/request-param.json"), Charset.defaultCharset());
+ inParams.put(ParamsHandlerConstant.INPUT_PARAM_JSON_DATA, jsonData);
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ propertyDefinitionNode.processMissingParamKeys(inParams, ctx);
+ }
@Test
public void testProcessExternalSystemParamKeys() throws Exception {