summaryrefslogtreecommitdiffstats
path: root/appc-config/appc-config-generator/provider/src/test/java
diff options
context:
space:
mode:
authorSandeep J <sandeejh@in.ibm.com>2018-08-08 17:39:08 +0530
committerTakamune Cho <tc012c@att.com>2018-08-09 15:27:02 +0000
commitfbea05903ae752ec6eefec5fdf32f6b3144e66c1 (patch)
tree933c010e95c77e28897aa43cd24856f80dcf4001 /appc-config/appc-config-generator/provider/src/test/java
parent6074b773516e3e02a4c6517fd1f4cf5a9c19b86b (diff)
added test case to TestPatternNode.java
to increase code coverage Issue-ID: APPC-1086 Change-Id: I4d035ffb81367fd4de4004d4aefa8a6433e4fd7d Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
Diffstat (limited to 'appc-config/appc-config-generator/provider/src/test/java')
-rw-r--r--appc-config/appc-config-generator/provider/src/test/java/org/onap/sdnc/config/generator/pattern/TestPatternNode.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/appc-config/appc-config-generator/provider/src/test/java/org/onap/sdnc/config/generator/pattern/TestPatternNode.java b/appc-config/appc-config-generator/provider/src/test/java/org/onap/sdnc/config/generator/pattern/TestPatternNode.java
index 9b94e627d..c1f66f2fb 100644
--- a/appc-config/appc-config-generator/provider/src/test/java/org/onap/sdnc/config/generator/pattern/TestPatternNode.java
+++ b/appc-config/appc-config-generator/provider/src/test/java/org/onap/sdnc/config/generator/pattern/TestPatternNode.java
@@ -6,6 +6,8 @@
* ================================================================================
* Copyright (C) 2017 Amdocs
* =============================================================================
+ * Modification Copyright (C) 2018 IBM.
+ * =============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -94,4 +96,15 @@ public class TestPatternNode {
assertEquals(ctx.getAttribute("test." + ConfigGeneratorConstant.OUTPUT_PARAM_STATUS),
ConfigGeneratorConstant.OUTPUT_STATUS_SUCCESS);
}
+
+ @Test
+ public void testCheckDataType() throws Exception {
+ PatternNode patternNode = new PatternNode();
+ Map<String, String> inParams = new HashMap<String, String>();
+ inParams.put(ConfigGeneratorConstant.INPUT_PARAM_RESPONSE_PRIFIX, "test");
+ inParams.put(ConfigGeneratorConstant.INPUT_PARAM_CHECK_DATA, "testData");
+ SvcLogicContext ctx = new SvcLogicContext();
+ patternNode.checkDataType(inParams, ctx);
+ assertEquals(ConfigGeneratorConstant.OUTPUT_STATUS_SUCCESS,ctx.getAttribute("test." + ConfigGeneratorConstant.OUTPUT_PARAM_STATUS));
+ }
}