added test case to JsonDgUtilImplTest.java 45/60145/3
authorSandeep J <sandeejh@in.ibm.com>
Sun, 12 Aug 2018 13:46:17 +0000 (19:16 +0530)
committerTakamune Cho <tc012c@att.com>
Thu, 16 Aug 2018 08:37:26 +0000 (08:37 +0000)
to increase code coverage

Issue-ID: APPC-1086
Change-Id: I5da9bfca629b3fa99f2b6fa85b2664828e844d69
Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
appc-dg/appc-dg-shared/appc-dg-common/src/test/java/org/onap/appc/dg/common/impl/JsonDgUtilImplTest.java

index 2e84473..3ce0aa4 100644 (file)
@@ -188,4 +188,15 @@ public class JsonDgUtilImplTest {
         assertNotNull(ctx.getAttribute("cvaas-file-content"));
         assertTrue(ctx.getAttribute("cvaas-file-content").contains(epochUploadTimestamp.toString()));
     }
+    
+    @Test(expected=APPCException.class)
+    public void testCheckFileCreated() throws APPCException
+    {
+        SvcLogicContext ctx= new SvcLogicContext();
+        ctx.setAttribute("cvaas-file-name", "testCvaasFile");
+        JsonDgUtilImpl jsonDgUtil = new JsonDgUtilImpl();
+        Map<String, String> params = new HashMap<>();
+        params.put("vnf-id", "testVnfId");
+        jsonDgUtil.checkFileCreated(params, ctx);
+    }
 }