diff options
author | Balaji, Ramya (rb111y) <rb111y@att.com> | 2018-03-13 16:58:23 -0400 |
---|---|---|
committer | Takamune Cho <tc012c@att.com> | 2018-03-14 14:25:40 +0000 |
commit | 9527f582f62b1cfeda7ba93035ea27376a40b97e (patch) | |
tree | 8059131d353651d49895b45c3c55f2b098fb468c /appc-outbound/appc-aai-client/provider/src/test | |
parent | 733ed3ba65c6d1cac885bf449a71e5d66bfccb4f (diff) |
Directed Graph & Associated code changes
Changes to DGs for A&AI processing and
for formatting controller template id
if passed in input.
Issue-ID: APPC-690, APPC-691
Change-Id: I3019d093f8327839aa286a5784fcc96bde0fb0d6
Signed-off-by: Balaji, Ramya (rb111y) <rb111y@att.com>
Diffstat (limited to 'appc-outbound/appc-aai-client/provider/src/test')
-rw-r--r-- | appc-outbound/appc-aai-client/provider/src/test/java/org/onap/appc/aai/client/node/TestAAIResourceNode.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/appc-outbound/appc-aai-client/provider/src/test/java/org/onap/appc/aai/client/node/TestAAIResourceNode.java b/appc-outbound/appc-aai-client/provider/src/test/java/org/onap/appc/aai/client/node/TestAAIResourceNode.java index e509a3403..f82370f1f 100644 --- a/appc-outbound/appc-aai-client/provider/src/test/java/org/onap/appc/aai/client/node/TestAAIResourceNode.java +++ b/appc-outbound/appc-aai-client/provider/src/test/java/org/onap/appc/aai/client/node/TestAAIResourceNode.java @@ -285,4 +285,30 @@ Map<String, String> inParams =new HashMap<String, String>(); assertEquals(ctx.getAttribute("test.vm.vnfc.vnfc-function-code"), "vnfcFuncCode2"); assertEquals(ctx.getAttribute("test.vm.vnfc.vnfc-group-notation"), "vnfcGrpNot2"); } + + @Test + public final void testGetFormattedValue() throws Exception{ + MockAAIResourceNode aairn = new MockAAIResourceNode(); + SvcLogicContext ctx = new SvcLogicContext(); + Map<String,String> inParams = new HashMap<String, String>(); + inParams.put(AppcAaiClientConstant.INPUT_PARAM_RESPONSE_PREFIX, "test"); + inParams.put("inputParameter", "Some/Value/With/ Many Spaces"); + aairn.getFormattedValue(inParams, ctx); + assertEquals(ctx.getAttribute("template-model-id"),"Some_Value_With_ManySpaces"); + + } + + @Test + public final void testProcessCheckForVfModule() throws Exception{ + MockAAIResourceNode aairn = new MockAAIResourceNode(); + SvcLogicContext ctx = new SvcLogicContext(); + Map<String,String> inParams = new HashMap<String, String>(); + inParams.put(AppcAaiClientConstant.INPUT_PARAM_RESPONSE_PREFIX, "test"); + inParams.put("inputParameter", "Some/Value/With/ Many Spaces"); + ctx.setAttribute("test.vnf.vm-with-no-vnfcs-count-vf-module", "0"); + ctx.setAttribute("test.vnf.vm-count-for-vf-module", "2"); + aairn.processCheckForVfModule("vfmoduleId1", ctx, "test.", 2); + + + } } |