diff options
author | Sandeep J <sandeejh@in.ibm.com> | 2018-08-23 14:59:35 +0530 |
---|---|---|
committer | Takamune Cho <tc012c@att.com> | 2018-08-23 20:45:59 +0000 |
commit | 95984f50947b143ec9b17bbc19cdff67ec1ee2b3 (patch) | |
tree | c44b1e31a029864a8dd80606f2308c2e9bbd8b49 /appc-config/appc-config-params/provider/src | |
parent | af43dd25b90b23a60062bf555325da5b98fc64f5 (diff) |
added test case to TestPropertyDefinitionNode.java
to increase code coverage
Issue-ID: APPC-1086
Change-Id: I7a07ce47115eff276217addc92baf1df15bdb06e
Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
Diffstat (limited to 'appc-config/appc-config-params/provider/src')
-rw-r--r-- | appc-config/appc-config-params/provider/src/test/java/org/onap/sdnc/config/params/parser/TestPropertyDefinitionNode.java | 14 |
1 files changed, 14 insertions, 0 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 6a9fe552d..4c0b60272 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 @@ -215,5 +215,19 @@ public class TestPropertyDefinitionNode { SvcLogicContext ctx = new SvcLogicContext(); propertyDefinitionNode.validateParams(inParams, ctx); } + + @Test + public void testValidateParamsForEmptyConfigParams() throws Exception + { + Map<String, String> inParams = new HashMap<String, String>(); + String jsonData = IOUtils.toString( + TestPropertyDefinitionNode.class.getClassLoader().getResourceAsStream("parser/pd.yaml"), + Charset.defaultCharset()); + inParams.put(ParamsHandlerConstant.INPUT_PARAM_PD_CONTENT, jsonData); + SvcLogicContext ctx = new SvcLogicContext(); + propertyDefinitionNode.validateParams(inParams, ctx); + String status = ctx.getAttribute("status"); + assertEquals(ParamsHandlerConstant.OUTPUT_STATUS_SUCCESS,status); + } } |