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-outbound/appc-network-inventory-client/provider/src | |
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-outbound/appc-network-inventory-client/provider/src')
2 files changed, 32 insertions, 2 deletions
diff --git a/appc-outbound/appc-network-inventory-client/provider/src/test/java/org/openecomp/appc/instar/node/Dme2ClientTest.java b/appc-outbound/appc-network-inventory-client/provider/src/test/java/org/openecomp/appc/instar/node/Dme2ClientTest.java new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/appc-outbound/appc-network-inventory-client/provider/src/test/java/org/openecomp/appc/instar/node/Dme2ClientTest.java diff --git a/appc-outbound/appc-network-inventory-client/provider/src/test/java/org/openecomp/appc/instar/node/TestInstarClientNode.java b/appc-outbound/appc-network-inventory-client/provider/src/test/java/org/openecomp/appc/instar/node/TestInstarClientNode.java index ca88d54db..00e580c39 100644 --- a/appc-outbound/appc-network-inventory-client/provider/src/test/java/org/openecomp/appc/instar/node/TestInstarClientNode.java +++ b/appc-outbound/appc-network-inventory-client/provider/src/test/java/org/openecomp/appc/instar/node/TestInstarClientNode.java @@ -48,6 +48,36 @@ import com.sun.jersey.api.client.filter.HTTPBasicAuthFilter; public class TestInstarClientNode { - - //ONAP Migration + + //ONAP Migration + + @Test(expected=Exception.class) + public void testInstarClientNode() throws Exception { + + SvcLogicContext ctx = new SvcLogicContext(); + String key_conetent = IOUtils.toString(TestInstarClientNode.class.getClassLoader().getResourceAsStream("templates/sampleKeyContents"), Charset.defaultCharset()); + Map<String, String> inParams = new HashMap<String, String>(); + inParams.put(InstarClientConstant.INPUT_PARAM_RESPONSE_PRIFIX, "TEST"); + inParams.put(InstarClientConstant.INSTAR_KEYS, "LOCAL_ACCESS_IP_ADDR"); + inParams.put("operationName", InstarClientConstant.OPERATION_GET_IPADDRESS_BY_VNF_NAME); + ctx.setAttribute("INSTAR.LOCAL_ACCESS_IP_ADDR", key_conetent); + ctx.setAttribute(InstarClientConstant.INPUT_PARAM_RESPONSE_PRIFIX, "TEST"); + ctx.setAttribute(InstarClientConstant.VNF_NAME, "basx0003v"); + InstarClientNode icn = new InstarClientNode(); + icn.getInstarInfo(inParams, ctx); + String address = (new JSONObject(ctx.getAttribute("TEST." + InstarClientConstant.INSTAR_KEY_VALUES))).getString("LOCAL_ACCESS_IP_ADDR"); + } + @Test(expected=Exception.class) + public void testInstarData() throws Exception { + + InstarClientNode inNode = new InstarClientNode(); + SvcLogicContext ctx = new SvcLogicContext (); + Map<String, String> inParams = new HashMap<String, String>(); + + inParams.put(InstarClientConstant.VNF_NAME, "basx0003v"); + inParams.put("operationName", InstarClientConstant.OPERATION_GET_IPADDRESS_BY_VNF_NAME); + inNode.getInstarData(inParams, ctx); + + + } } |