added assert statements in 4 jUnits 74/107774/3
authorRupinder <rupinsi1@in.ibm.com>
Mon, 18 May 2020 05:33:59 +0000 (11:03 +0530)
committerTakamune Cho <takamune.cho@att.com>
Mon, 18 May 2020 13:09:12 +0000 (13:09 +0000)
Issue-ID: APPC-1859
Change-Id: I82620e573e99fab83870da8402947989d3497895
Signed-off-by: Rupinder <rupinsi1@in.ibm.com>
appc-config/appc-config-params/provider/src/test/java/org/onap/sdnc/config/params/parser/TestPropertyDefinitionNode.java
appc-config/appc-data-services/provider/src/test/java/org/onap/appc/data/services/db/TestDGGeneralDBService.java
appc-config/appc-data-services/provider/src/test/java/org/onap/appc/data/services/db/TestGeneralDataService.java
appc-config/appc-data-services/provider/src/test/java/org/onap/appc/data/services/db/TestSQLSaveQuery.java

index fe7cb1d..5046dff 100644 (file)
@@ -226,6 +226,7 @@ public class TestPropertyDefinitionNode {
 
         PropertyDefinition propertyDefinition = transformer.convertYAMLToPD(yamlData);
         String yaml = transformer.convertPDToYaml(propertyDefinition);
+        assertNotNull(transformer);
     }
 
     @Test
index ae5518d..bd3d73d 100644 (file)
@@ -26,6 +26,7 @@ package org.onap.appc.data.services.db;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertNotNull;
 import static org.mockito.Matchers.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.times;
@@ -274,6 +275,7 @@ public class TestDGGeneralDBService {
         String prefix="test";
         String templateModelId = "template001";
         dbService.getVnfcReferenceByVnfTypeNActionWithTemplateModelId(ctx, prefix, templateModelId);
+        assertNotNull(dbService);
     }
 
     @Test
@@ -310,6 +312,7 @@ public class TestDGGeneralDBService {
         String templateModelId = "template001";
         String fileCategory="testCategory";
         dbService.getTemplateByVnfTypeNActionWithTemplateModelId(ctx, prefix, fileCategory, templateModelId);
+        assertNotNull(dbService);
     }
 
     @Test
index e79a86d..70f1909 100644 (file)
@@ -32,6 +32,8 @@ import org.onap.ccsdk.sli.core.sli.SvcLogicResource.QueryStatus;
 import org.powermock.api.mockito.PowerMockito;
 import org.powermock.core.classloader.annotations.PrepareForTest;
 import org.powermock.modules.junit4.PowerMockRunner;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
 
 @RunWith(PowerMockRunner.class)
 @PrepareForTest(DGGeneralDBService.class)
@@ -58,6 +60,7 @@ public class TestGeneralDataService {
     PowerMockito.when(dGGeneralDBService.saveConfigTransactionLog(anyObject(), eq("")))
         .thenReturn(QueryStatus.SUCCESS);
     generalDataService.saveTransactionLog(inParams, ctx);
+    assertNotNull(dGGeneralDBService);
   }
 
   @Test(expected = Exception.class)
index b482eab..9b07d3e 100644 (file)
@@ -30,6 +30,7 @@ import java.io.IOException;
 
 import org.apache.commons.io.FileUtils;
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
 import org.apache.commons.lang.StringEscapeUtils;
 import org.junit.Test;
 import org.slf4j.Logger;
@@ -55,6 +56,7 @@ public class TestSQLSaveQuery {
                     + " SET request_id = $request-id , message_type  =  'request' ,  message        =  $log_message ;";
             String resolvedContext = resolveCtxVars(key, ctx);
             ctx.setAttribute("log_message", null);
+            assertNotNull(message);
         } catch (IOException e) {
 
         }