diff options
author | Anand Chaturvedi <ac204h@att.com> | 2017-08-24 00:10:17 -0400 |
---|---|---|
committer | Anand Chaturvedi <ac204h@att.com> | 2017-08-24 01:01:46 -0400 |
commit | 96119e62a35496ecb0093c0f55300dffb95c8d33 (patch) | |
tree | 64874a9c7dd5792185237a7e4164f2c025a7fde5 /appc-config/appc-flow-controller/provider/src/test/java/org/openecomp/appc/flow/executor/node/TestParsingNode.java | |
parent | f0f51b3047ea290e2280af64b39ca0983f3377f5 (diff) |
Added New Junit Cases for APPC Design Services
Issue-ID: APPC-168
Change-Id: Ib321bb77af3cb47abfce80d96f50a6b75b34b34e
Signed-off-by: Anand Chaturvedi <ac204h@att.com>
Diffstat (limited to 'appc-config/appc-flow-controller/provider/src/test/java/org/openecomp/appc/flow/executor/node/TestParsingNode.java')
-rw-r--r-- | appc-config/appc-flow-controller/provider/src/test/java/org/openecomp/appc/flow/executor/node/TestParsingNode.java | 66 |
1 files changed, 14 insertions, 52 deletions
diff --git a/appc-config/appc-flow-controller/provider/src/test/java/org/openecomp/appc/flow/executor/node/TestParsingNode.java b/appc-config/appc-flow-controller/provider/src/test/java/org/openecomp/appc/flow/executor/node/TestParsingNode.java index 9f08424f9..8097a05dc 100644 --- a/appc-config/appc-flow-controller/provider/src/test/java/org/openecomp/appc/flow/executor/node/TestParsingNode.java +++ b/appc-config/appc-flow-controller/provider/src/test/java/org/openecomp/appc/flow/executor/node/TestParsingNode.java @@ -35,56 +35,18 @@ import org.openecomp.sdnc.sli.SvcLogicContext; public class TestParsingNode { -// @Before - public void setUp() { - Properties props = new Properties(); - InputStream propStr = getClass().getResourceAsStream("/svclogic.properties"); - if (propStr == null) { - System.err.println("src/test/resources/svclogic.properties missing"); - } - try { - System.out.println("Got Properties"); - props.load(propStr); - propStr.close(); - } catch (Exception e) { - e.printStackTrace(); - System.err.println("Could not initialize properties"); - } - // Add properties to global properties - - Enumeration propNames = props.keys(); - - while (propNames.hasMoreElements()) { - - String propName = (String) propNames.nextElement(); - System.setProperty(propName, props.getProperty(propName)); - System.out.println("propName" + propName + " Value: " + props.getProperty(propName)); - } - - - - } - - -// @Test - public void testRestServiceNode() throws Exception { - - SvcLogicContext ctx = new SvcLogicContext(); - - - - HashMap<String, String> inParams = new HashMap<String, String>(); - JsonParsingNode rsn = new JsonParsingNode(); - inParams.put("data", "{\"identifier\": \"scope represented\",\"state\": \"healthy\",\"test\": \"passed\", \"time\": \"01-01-1000:0000\"}"); - inParams.put("responsePrefix", "APPC.healthcheck"); - rsn.parse(inParams, ctx); - - for (Object key : ctx.getAttributeKeySet()) { - String parmName = (String) key; - String parmValue = ctx.getAttribute(parmName); - System.out.println(parmName + "=" + parmValue); - } - - - } + @Test + public void testRestServiceNode() throws Exception { + SvcLogicContext ctx = new SvcLogicContext(); + HashMap<String, String> inParams = new HashMap<String, String>(); + JsonParsingNode rsn = new JsonParsingNode(); + inParams.put("data", "{\"identifier\": \"scope represented\",\"state\": \"healthy\",\"test\": \"passed\", \"time\": \"01-01-1000:0000\"}"); + inParams.put("responsePrefix", "APPC.healthcheck"); + rsn.parse(inParams, ctx); + for (Object key : ctx.getAttributeKeySet()) { + String parmName = (String) key; + String parmValue = ctx.getAttribute(parmName); + } + + } } |