Directed Graph & Associated code changes
[appc.git] / appc-outbound / appc-aai-client / provider / src / test / java / org / onap / appc / aai / client / node / TestAAIResourceNode.java
index e509a34..f82370f 100644 (file)
@@ -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);
+
+
+    }
 }