added test case to TestDGGeneralDBService 73/75973/2
authorSandeep J <sandeejh@in.ibm.com>
Fri, 18 Jan 2019 07:54:42 +0000 (13:24 +0530)
committerTakamune Cho <takamune.cho@att.com>
Fri, 18 Jan 2019 15:42:08 +0000 (15:42 +0000)
to increase code coverage

Issue-ID: APPC-1086
Change-Id: I2e5908c7f4728ff9cd33d11ddf6b398c0a472bdd
Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
appc-config/appc-data-services/provider/src/test/java/org/onap/appc/data/services/db/TestDGGeneralDBService.java

index 234b3fa..e8c42b7 100644 (file)
@@ -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()
     {