added assert statement in dbServiceTest.java 71/107871/2
authorRupinder <rupinsi1@in.ibm.com>
Tue, 19 May 2020 12:27:48 +0000 (17:57 +0530)
committerTakamune Cho <takamune.cho@att.com>
Tue, 19 May 2020 14:14:14 +0000 (14:14 +0000)
Issue-ID: APPC-1859
Change-Id: If145687a4cd9f5a71b9f0da2a65f5211d6653ec0
Signed-off-by: Rupinder <rupinsi1@in.ibm.com>
appc-inbound/appc-artifact-handler/provider/src/test/java/org/onap/appc/artifact/handler/dbservices/DBServiceTest.java

index c71f56d..4c8b712 100644 (file)
@@ -57,6 +57,7 @@ public class DBServiceTest {
         ctx.setAttribute("test", "test");
         int internalVersion = 1;
         dbService.saveArtifacts(ctx, internalVersion);
+        assertNotNull(dbService);
     }
 
     @Test
@@ -76,6 +77,7 @@ public class DBServiceTest {
         boolean isUpdate = true;
         ctx.setAttribute(SdcArtifactHandlerConstants.DOWNLOAD_DG_REFERENCE, "Reference");
         dbService.processConfigActionDg(ctx, isUpdate);
+        assertNotNull(ctx);
     }
 
 
@@ -96,6 +98,7 @@ public class DBServiceTest {
         String artifactId = "TestArtifact";
         String yangContents = "TestYangContents";
         dbService.updateYangContents(ctx, artifactId, yangContents);
+        assertNotNull(yangContents);
     }
 
     @Test
@@ -109,6 +112,7 @@ public class DBServiceTest {
         String actionLevel = "testActionLevel";
         String template = "testTemplateData";
         dbService.insertProtocolReference(ctx, vnfType, protocol, action, actionLevel, template);
+        assertNotNull(template);
     }
 
 
@@ -123,6 +127,7 @@ public class DBServiceTest {
         String actionLevel = "testActionLevel";
         String template = "testTemplateData";
         dbService.insertProtocolReference(ctx, vnfType, protocol, action, actionLevel, template);
+        assertNotNull(action);
     }
 
     @Test
@@ -132,6 +137,7 @@ public class DBServiceTest {
         ctx.setAttribute("test", "test");
         boolean isUpdate = true;
         dbService.processDownloadDgReference(ctx, isUpdate);
+        assertNotNull(dbService);
     }
 
     @Test
@@ -141,6 +147,7 @@ public class DBServiceTest {
         ctx.setAttribute("test", "test");
         boolean isUpdate = false;
         dbService.processVnfcReference(ctx, isUpdate);
+        assertNotNull(dbService);
     }
 
     @Test
@@ -257,6 +264,7 @@ public class DBServiceTest {
         ctx.setAttribute("test", "test");
         String db = "db";
         dbService.getArtifactID(ctx, db);
+        assertNotNull(dbService);
     }
 
     @Test
@@ -436,6 +444,7 @@ public class DBServiceTest {
         MockDBService dbService = MockDBService.initialise(true);
         SvcLogicContext ctx = new SvcLogicContext();
         dbService.processConfigureActionDg(ctx, true);
+        assertNotNull(ctx);
     }
     
     @Test
@@ -449,7 +458,7 @@ public class DBServiceTest {
         String actionLevel = "testActionLevel";
         String template = "testTemplateData";
         dbService.updateProtocolReference(ctx, vnfType, protocol, action, actionLevel, template);
-       
+        assertNotNull(vnfType);
     }
     
 }