From bfe98bb6459acf01a932401e3d68f228d2fea14d Mon Sep 17 00:00:00 2001 From: Sandeep J Date: Fri, 18 Jan 2019 13:24:42 +0530 Subject: added test case to TestDGGeneralDBService to increase code coverage Issue-ID: APPC-1086 Change-Id: I2e5908c7f4728ff9cd33d11ddf6b398c0a472bdd Signed-off-by: Sandeep J --- .../onap/appc/data/services/db/TestDGGeneralDBService.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'appc-config/appc-data-services/provider') diff --git a/appc-config/appc-data-services/provider/src/test/java/org/onap/appc/data/services/db/TestDGGeneralDBService.java b/appc-config/appc-data-services/provider/src/test/java/org/onap/appc/data/services/db/TestDGGeneralDBService.java index 234b3fab5..e8c42b7e0 100644 --- a/appc-config/appc-data-services/provider/src/test/java/org/onap/appc/data/services/db/TestDGGeneralDBService.java +++ b/appc-config/appc-data-services/provider/src/test/java/org/onap/appc/data/services/db/TestDGGeneralDBService.java @@ -25,6 +25,7 @@ package org.onap.appc.data.services.db; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; import java.io.IOException; import org.apache.commons.io.IOUtils; @@ -295,6 +296,18 @@ public class TestDGGeneralDBService { } + @Test + public void testGetCapability() throws Exception { + SvcLogicContext ctx = new SvcLogicContext(); + ctx.setAttribute("vnf-type", "test"); + ctx.setAttribute("artifactName", "template001"); + ctx.setAttribute("maxInternalVersion", "1234"); + MockDGGeneralDBService dbService = MockDGGeneralDBService.initialise(); + String status = dbService.getCapability(ctx, "test"); + assertNull(status); + + } + @Test public void testCleanContextPropertyByPrefix() { -- cgit 1.2.3-korg