aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSandeep J <sandeejh@in.ibm.com>2018-08-12 19:16:17 +0530
committerTakamune Cho <tc012c@att.com>2018-08-16 08:37:26 +0000
commit455c7f386111838d37e89b0fcc26b9497caf2b62 (patch)
treee712ef5373c080736fe7d4525d4b776232c1680f
parent3d2c3841f6f1351d266b395b1a0c6781b4413e8f (diff)
added test case to JsonDgUtilImplTest.java
to increase code coverage Issue-ID: APPC-1086 Change-Id: I5da9bfca629b3fa99f2b6fa85b2664828e844d69 Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
-rw-r--r--appc-dg/appc-dg-shared/appc-dg-common/src/test/java/org/onap/appc/dg/common/impl/JsonDgUtilImplTest.java11
1 files changed, 11 insertions, 0 deletions
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<String, String> params = new HashMap<>();
+ params.put("vnf-id", "testVnfId");
+ jsonDgUtil.checkFileCreated(params, ctx);
+ }
}