From 455c7f386111838d37e89b0fcc26b9497caf2b62 Mon Sep 17 00:00:00 2001 From: Sandeep J Date: Sun, 12 Aug 2018 19:16:17 +0530 Subject: added test case to JsonDgUtilImplTest.java to increase code coverage Issue-ID: APPC-1086 Change-Id: I5da9bfca629b3fa99f2b6fa85b2664828e844d69 Signed-off-by: Sandeep J --- .../java/org/onap/appc/dg/common/impl/JsonDgUtilImplTest.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/appc-dg/appc-dg-shared/appc-dg-common/src/test/java/org/onap/appc/dg/common/impl/JsonDgUtilImplTest.java b/appc-dg/appc-dg-shared/appc-dg-common/src/test/java/org/onap/appc/dg/common/impl/JsonDgUtilImplTest.java index 2e84473fe..3ce0aa4fe 100644 --- a/appc-dg/appc-dg-shared/appc-dg-common/src/test/java/org/onap/appc/dg/common/impl/JsonDgUtilImplTest.java +++ b/appc-dg/appc-dg-shared/appc-dg-common/src/test/java/org/onap/appc/dg/common/impl/JsonDgUtilImplTest.java @@ -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 params = new HashMap<>(); + params.put("vnf-id", "testVnfId"); + jsonDgUtil.checkFileCreated(params, ctx); + } } -- cgit 1.2.3-korg